This topic is locked

Unknown column in WHERE clause .....

12/12/2018 11:38:14 AM
PHPRunner General questions
S
schaet author

I have an odd issue here that has me pretty much dead in the water. The query below works fine in the Query Designer and produces all the data, however when I compile the application and try to add a new record I get the following error:
php error happened
Technical information

Error type 256

Error description Unknown column '1107-interfaces_addresses_systemname.address' in 'where clause'

URL 10.101.41.210/checkduplicates.php?

Error file /var/www/singlepane/connections/Connection.php

Error line 642

SQL query SELECT count(
) from system-addresses-ip ranges where 1107-interfaces_addresses_systemname.address='`1.1.1.1'

More info
Call stack

File: line Function Arguments

0. connections/Connection.php:642 trigger_error 1. Unknown column '1107-interfaces_addresses_systemname.address' in 'where clause'; 2. 256;

1. connections/Connection.php:642 Connection->triggerError 1. Unknown column '1107-interfaces_addresses_systemname.address' in 'where clause';

2. connections/MySQLiConnection.php:143 MySQLiConnection->query 1. SELECT count(*) from system-addresses-ip ranges where 1107-interfaces_addresses_systemname.address='`1.1.1.1';

3. checkduplicates.php:58 Global scope N/A



*
Here's my setup:

I have two tables that have a MASTER - DETAIL relationship based on system_name

system-addresses-ip ranges (Master)

1107-interfaces_addresses_systemname (Detail)
I have a SQL query:
SELECT

system-addresses-ip ranges.addr_record_id,

system-addresses-ip ranges.interface_addresss_comment,

system-addresses-ip ranges.config,

system-addresses-ip ranges.int_record_id,

system-addresses-ip ranges.comment,

system-addresses-ip ranges.system_name,

system-addresses-ip ranges.name AS Interface Name,

system-addresses-ip ranges.range_record_id,

system-addresses-ip ranges.comment1,

system-addresses-ip ranges.use,

system-addresses-ip ranges.datacenter,

system-addresses-ip ranges.zone,

system-addresses-ip ranges.first_ip,

system-addresses-ip ranges.last_ip,

system-addresses-ip ranges.subnet,

1107-interfaces_addresses_systemname.address

FROM system-addresses-ip ranges

INNER JOIN 1107-interfaces_addresses_systemname ON system-addresses-ip ranges.system_name = 1107-interfaces_addresses_systemname.system_name

WHERE (INET_ATON(1107-interfaces_addresses_systemname.address) BETWEEN INET_ATON(first_ip) AND INET_ATON(last_ip))
** To explain the 'where' clause: It's there to organize the IP addresses into group that hey fit in under ranges; IE. if I have a range 1.1.1.1 - 1.1.1.10 all the IP addresses that fit between them are grouped together
Like I mentioned above, the query works fine in the Query Designer and it works fine in the application, however if I try to add a new record, specifically when I add the "IP address" I get the error above. I'm almost certain that I had it working, but somehow messed it up. I've searched the interwebs and tried a few suggestions, however no luck.
anyone encounter this before?

admin 12/12/2018

What version of PHPRunner is that? If this is not the latest I would suggest to build the same project with the latest version to see if it helps.

S
schaet author 12/12/2018



What version of PHPRunner is that? If this is not the latest I would suggest to build the same project with the latest version to see if it helps.


Hi Sergey,

I'm currently using 9.7 (Upgrading to latest this week) however I did download the latest on a trial and did as you say, however I'm met with the same results.
Any ideas?

admin 12/13/2018

I would need to take a closer look at this - something is not right with project setup. Post it to Demo Account and contact support directly.