Installed 1.7.0 RC3, 1064 getting error in sql syntax;

Ask community to help.

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
mpearson
TestLink user
Posts: 2
Joined: Mon Jul 23, 2007 1:59 pm
Location: UTAH

Installed 1.7.0 RC3, 1064 getting error in sql syntax;

Post by mpearson »

1.7.0 RC3 on Windows 2003 server, mysql 4.1, php 5, apache 2.2.4

new to php and my sql.

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 'OR testproject_id = 0 ) ORDER BY name' at line 3 - SELECT
nodes_hierarchy.id, nodes_hierarchy.name, notes,active, testproject_id
FROM nodes_hierarchy,testplans WHERE nodes_hierarchy.id=testplans.id
AND (testproject_id = OR testproject_id = 0 ) ORDER BY name1064 - 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 'AND
CFTP.active=1 AND CF.show_on_design=1 AND CF.enable_on_desig' at line 1
- SELECT CF.*,CFTP.display_order,CFDV.value AS value,CFDV.node_id AS
node_id FROM custom_fields CF JOIN cfield_testprojects CFTP ON
CFTP.field_id=CF.id JOIN cfield_node_types CFNT ON CFNT.field_id=CF.id
AND CFNT.node_type_id=5 LEFT OUTER JOIN cfield_design_values CFDV ON
CFDV.field_id=CF.id AND CFDV.node_id=0 WHERE CFTP.testproject_id= AND
CFTP.active=1 AND CF.show_on_design=1 AND CF.enable_on_design=1 ORDER
BY display_order,CF.id
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Post by fman »

What operation was you doing when you got this error ?
mpearson
TestLink user
Posts: 2
Joined: Mon Jul 23, 2007 1:59 pm
Location: UTAH

figured it out.

Post by mpearson »

I was trying to create a new test suite when the error occurred.

My project was not set up correctly, so it was not finding the project. I had to go back in as admin and create a new project. Once I did it worked fine.

Thanks.
drew
Advanced user
Posts: 23
Joined: Fri Jun 30, 2006 8:19 pm

Post by drew »

I'm having the same issue.
Oneilius
TestLink user
Posts: 4
Joined: Wed Feb 06, 2008 10:03 pm

Cannot create a Test Plan

Post by Oneilius »

I am getting exactly the same message when trying to just create a Test Plan. I log in, click "Test Plan Management" on the right, get a message that no Test Plans are defined, and then click the Create button. At the top of the next page, this error message displays at the top. If I fill out the form (which does show on the page) and then click the Create button, I get a message that the page cannot be displayed. Has there been much investigation into this? It appears there is a flaw in the SQL used by TestLink....
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Post by fman »

use only last stable release 1.7.3
Oneilius
TestLink user
Posts: 4
Joined: Wed Feb 06, 2008 10:03 pm

Re: Installed 1.7.0 RC3, 1064 getting error in sql syntax;

Post by Oneilius »

Thanks for your help with this. We have now upgraded to 1.7.3, but now a new problem has arisen. Firstly, the same SQL error message appears as described before, although submitting the Test Plan no longer gives a "Page cannot be displayed" message. Instead, I get this new SQL error message (the first half of it is the same as before):

1064 - 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 'OR testproject_id = 0 ) ORDER BY name' at line 3 - SELECT nodes_hierarchy.id, nodes_hierarchy.name, notes,active, testproject_id FROM nodes_hierarchy,testplans WHERE nodes_hierarchy.id=testplans.id AND (testproject_id = OR testproject_id = 0 ) ORDER BY name1064 - 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 'AND UPPER(NH.name)='REGRESSION TESTING'' at line 1 - SELECT NH.id, NH.name, testproject_id FROM nodes_hierarchy NH, testplans WHERE NH.id=testplans.id AND testproject_id = AND UPPER(NH.name)='REGRESSION TESTING'

Any further thoughts?
Oneilius
TestLink user
Posts: 4
Joined: Wed Feb 06, 2008 10:03 pm

Installed 1.7.0 RC3, 1064 getting error in sql syntax;

Post by Oneilius »

I haven't seen a reply to my last post yet, so I was wondering if anyone might know the answer. :( I have upgraded to 1.7.3 now, but I am getting the SQL error message indicated in my last post. Does anyone know why I would be seeing this or what I would need to do to get it corrected? We'd like to use TestLink as soon as possible, but I can't even create a Test Plan at present. Any help would be appreciated.
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Post by fman »

Destroy your old installation, remove everything.
Get 1.7.4
Do fresh install
Now you must be up and running
Oneilius
TestLink user
Posts: 4
Joined: Wed Feb 06, 2008 10:03 pm

Continuing issues with TestLink Test Plan creation

Post by Oneilius »

We have completely blown away TestLink and then installed version 1.7.4. We still are having issues. The SQL error when you go to create a test plan has the following at the top:

1064 - 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 'OR testproject_id = 0 ) ORDER BY name' at line 3 - SELECT nodes_hierarchy.id, nodes_hierarchy.name, notes,active, testproject_id FROM nodes_hierarchy,testplans WHERE nodes_hierarchy.id=testplans.id AND (testproject_id = OR testproject_id = 0 ) ORDER BY name1064 - 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 'AND CFTP.active=1 AND CF.show_on_design=1 AND CF.enable_on_desig' at line 1 - SELECT CF.*,CFTP.display_order,CFDV.value AS value,CFDV.node_id AS node_id FROM custom_fields CF JOIN cfield_testprojects CFTP ON CFTP.field_id=CF.id JOIN cfield_node_types CFNT ON CFNT.field_id=CF.id AND CFNT.node_type_id=5 LEFT OUTER JOIN cfield_design_values CFDV ON CFDV.field_id=CF.id AND CFDV.node_id=0 WHERE CFTP.testproject_id= AND CFTP.active=1 AND CF.show_on_design=1 AND CF.enable_on_design=1 ORDER BY display_order,CF.id

Thereafter, if you fill in the form and try to save the plan, I get a "The webpage cannot be found" error in IE7. In FF2, I get a SQL error message, as follows:

1064 - 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 'OR testproject_id = 0 ) ORDER BY name' at line 3 - SELECT nodes_hierarchy.id, nodes_hierarchy.name, notes,active, testproject_id FROM nodes_hierarchy,testplans WHERE nodes_hierarchy.id=testplans.id AND (testproject_id = OR testproject_id = 0 ) ORDER BY name1064 - 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 'AND UPPER(NH.name)='TEST PLAN: 3/4/08'' at line 1 - SELECT NH.id, NH.name, testproject_id FROM nodes_hierarchy NH, testplans WHERE NH.id=testplans.id AND testproject_id = AND UPPER(NH.name)='TEST PLAN: 3/4/08'

What could possibly be the issue here? Clearly there is a problem with TestLink's SQL. We downloaded 1.7.4 from http://sourceforge.net/project/showfile ... _id=577783
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Post by fman »

As ypu can see testproject id is missing in SQL statement,
but this seems to be an strange problem in your installation, because no other is signaling it.

Please get our xampp+testlink+mantis in this forum and try it.


regards
Post Reply