This topic is locked

Unable to view table

2/4/2009 12:28:51 AM
PHPRunner General questions
R
Rodj_aus author

Hello,

I have a master-detail setup where the master table lists suppliers and two detail tables hold the delivery dockets and purchase orders, each with their own detail table for their line items.
The master-detail for Suppliers-Purchase Orders works fine but when I am in the list view of the Suppliers and click on the Delivery Docket link I get the following error message.

=======================================================

Technical information

Error type: 256

Error description: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where (Supplier_ID='') and (Supplier_ID='123')' at line 1

URL: test.company.com.au/Suppliers/delivery_docket_header_list.php?mastertable=suppliers&masterkey1=123

Error file: D:\iNet\Test\Suppliers\include\dbconnection.php

Error line: 34

SQL query: select count(*) where (Supplier_ID='') and (Supplier_ID='123')

Solution: This is a general error. It occurs when there is an error in event code or in SQL.

========================================================
I have rebuilt all pages and deleted all data from the Delivery Docket table and its detail table but still get the same error.

From the error message the SQL statement seems to be missing the table name for some reason.
I am using PHPRunner 5.0 build 437
Thank you

Rod Johnson

J
Jane 2/4/2009

Rod,
download and install latest PHPRunner build 766:

http://www.xlinesoft.com/download

Then open and rebuild your project.
If it doesn't help publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with instructions on reproducing this error.

R
Rodj_aus author 2/5/2009

Thanks Jane,

I did that but I then found the problem to be a mismatch in the database fields and the schema in PHP Runner. One of the fields was changed external to PHP Runner.

I fixed the schema and all works again.
One problem I am having is the Master-Detail link is a string field and although the record total for the detail table appears on the Master screen when I go to the detail screen or view the pop-up there are no records.
Regards

Rod Johnson

J
Jane 2/6/2009

Rod,
It's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with instructions on reproducing this error.

R
Rodj_aus author 2/8/2009

Hi Jane,

I built a small sample to upload and found it worked fine so I went looking further and found it was my Log-in access control that didn't allow access to the table. So even though the tables were linked and reported the total entries available the log-in didn't allow me to view the details. All fixed now. Thanks for your time.

regards

Rod