This topic is locked

Query size limit?

2/24/2008 1:17:04 AM
PHPRunner General questions
B
barlow author

Is there a limit or restriction to the SQL query that PHPrunner uses? After adding fields to a db table the "Edit SQL Entry" query page (step in the wizard) begins to fail with 'Cannot retrieve columns information'.
An example of the failing SQL query is:
[indent]

select `id`,

`created_at`,

`Name`,

`MHR`,

`Date-FirstAppointment`,

`Date-FirstVisit`,

`DOB`,

`sex`,

`q1 - Depressed Mood`,

`q2 - Elevated Mood`,

`q3 - Fluctuating Mood (Mood Swings)`,

`q4 - Suicidal Thoughts / Actions / Behaviour`,

`q5 - Obsessive Thoughts`,

`q6 - Compulsive Behaviour`,

`q7 - Phobia(s)`,

`q8 - Panic Symptoms or Attacks`,

`q9 - Social Anxiety`,

`q11 - Flashbacks / Other Post-Traumatic Stress Synd`,

`q10 - Excessive Worrying`,

`My Input Box 1`

From `form_results` [/indent]
Deleting one of the items in the list (e.g. "My Input Box 1") miraculously allows the query to work.
Code to make an example table:
[indent]SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
CREATE TABLE `form_results` (

`id` int(11) NOT NULL auto_increment,

`created_at` datetime NOT NULL,

`Name` varchar(255) NOT NULL default '',

`MHR` varchar(255) NOT NULL default '',

`Date-FirstAppointment` varchar(255) NOT NULL default '',

`Date-FirstVisit` varchar(255) NOT NULL default '',

`DOB` varchar(255) NOT NULL default '',

`sex` varchar(255) NOT NULL default '',

`q1 - Depressed Mood` varchar(255) NOT NULL default '',

`q2 - Elevated Mood` varchar(255) NOT NULL default '',

`q3 - Fluctuating Mood (Mood Swings)` varchar(255) NOT NULL default '',

`q4 - Suicidal Thoughts / Actions / Behaviour` varchar(255) NOT NULL default '',

`q5 - Obsessive Thoughts` varchar(255) NOT NULL default '',

`q6 - Compulsive Behaviour` varchar(255) NOT NULL default '',

`q7 - Phobia(s)` varchar(255) NOT NULL default '',

`q8 - Panic Symptoms or Attacks` varchar(255) NOT NULL default '',

`q9 - Social Anxiety` varchar(255) NOT NULL default '',

`q11 - Flashbacks / Other Post-Traumatic Stress Synd` varchar(255) NOT NULL default '',

`q10 - Excessive Worrying` varchar(255) NOT NULL default '',

`My Input Box 1` varchar(255) NOT NULL default '',

PRIMARY KEY (`id`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
INSERT INTO `form_results` VALUES(1, '2008-02-23 09:59:09', '', '213', 'dd/mm/yyyy', 'dd/mm/yyyy', '123', 'Female', 'checked', '', 'checked', '', 'checked', '', 'checked', '', 'checked', 'checked', '', ''); [/indent]
I'm accessing MySQL located on a server via phprunner.php - could that be the problem? Any thoughts?
Thanks

J
Jane 2/26/2008

Hi,
this query is successfully executed on my test box.

Please make sure that you use last version of PHPRunner.

B
barlow author 2/28/2008

Hi,

this query is successfully executed on my test box.

Please make sure that you use last version of PHPRunner.


Hi Jane,
I think I have the latest version - I downloaded the trial version within a day of hitting this problem.
When you tested the scenario did you run things locally? I haven't tried that myself, I upload to a remote web location and use phprunner.php to access the remote MySQL. Could it be some sort of limitation in phprunner.php? To me it looks like I'm hitting a string or array length problem: I add a new term to an existing, working, SQL query and wham, I suddenly get these errors. Delete the term, everything OK. I try running the query remotely using phpadmin..... everything fine.
Thanks,

Chris

B
barlow author 2/29/2008

Just following up.....
It sure looks like a phprunner.php problem. I tried my problem scenario with an Apache/PHP/MySQL setup locally and it worked fine. I then uploaded the working set to the remote server, and again it was fine there. So the problem occurs when accessing the remote db via phprunner.php.
Regards,

Chris