False postive mysql in joomla code "Unable to resolve column"

I have this php code:

$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('waarde')));
$query->from($db->quoteName('#__sometable'));
$query->where($db->quoteName('config') . " = " . $db->quote("crondag"));
$db->setQuery($query);


I trippel check if the collum exsist it does en code works but phpstorm thinks for some stupid reason that it need to look what is defined sevral hunderd lines below!
When i click on edit mysql statement i just get this

SELECT waarde from xxxxxx_totaliedivrenttable

witch is defined in totaly diverent function on line

the code is exactly the same only diverent table and select criteria!

$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('groepring_code')));
$query->from($db->quoteName('#__HCCxmlOnderwerpen_group_map'));




Why is phpstorm checking wrong?


2
8 comments

Checked: I'm also getting this.

Do you recall if this was working correctly before?

0

i am not sure sorry 

0

Just to confirm, what version of PhpStorm do you have?

0

PhpStorm 2019.2.1
Build #PS-192.6262.66, built on August 22, 2019
Licensed to Bas van den Dikkkenberg
Subscription is active until April 6, 2020
Runtime version: 11.0.3+12-b304.39 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1981M
Cores: 8
Registry: run.processes.with.pty=TRUE
Non-Bundled Plugins: BashSupport

0

Can't reproduce that locally, so it must be a local issue: http://prntscr.com/p469to
You are saying that it's working properly with the other code, even in the same file?

What concerns me the most is this:

When i click on edit mysql statement i just get this SELECT waarde from xxxxxx_totaliedivrenttable

Looks like a caching issue or something. Please check if File | Invalidate Caches / Restart | Invalidate and Restart helps.

0

Clearing cache doesn't help already did that, 

But Dmitry Tronin also confirmd it.  so not a local problem

and it is not in one part of the code acording to inspect of code 220 times https://prnt.sc/p49b24

 

0

We were discussing this problem: I've reproduced this problem on a non-Joomla database. So apparently either I am wrong or you're using this on non-Joomla db?

0

I am using db of my project witch is in the joomla db 

 

 

0

Please sign in to leave a comment.