Forums
This topic is locked
Filtering a recordset.
Posted 16 Jan 2004 00:32:56
1
has voted
16 Jan 2004 00:32:56 Jennifer Biggs posted:
I am having problems loading my page when filtering a recordset using the WHERE command in Dreamweaver MX using PHP & MySQL.The following SQL statement works & my page loads fine:
SELECT *
FROM `species` INNER JOIN `seed` ON (`species`.`SpecieID` = `seed`.`SpecieID`)
ORDER BY `species`.`Type`, `species`.`SpecieName`
, but when I add the WHERE command to filter the records...
SELECT *
FROM `species` INNER JOIN `seed` ON (`species`.`SpecieID` = `seed`.`SpecieID`)
WHERE `seed`.`Availability`="Yes"
ORDER BY `species`.`Type`, `species`.`SpecieName`
...my page will not load. When I test the SQL statement in the Dreamweaver recordset dialog box it shows the filtered records, but when I try and load my page it is blank. When I attempt to run Live Query View in Dreamweaver without the WHERE command it works, but when I try it with the WHERE command I get the following error message:
The testing server did not execute any of the scripts in your document. Possible explanations include:
1. The testing server is not running.
2. The testing server ignores files with the ".php" file extension.
3. Your document does not contain any scripts.
I would appreciate any suggestions.
Thanks
Replies
Replied 04 Feb 2005 16:07:19
04 Feb 2005 16:07:19 new bie replied:
SUMMARIZING 4 TROUBLESHOOTING POINTS FOR MYSQL CONNECTION
1) In Dreamweaver, go to Sites/Manage Sites/Advanced, in “Testing Server,” be sure to configure URL
prefix: localhost/ .... See Check the URL Prefix in the Site Definition at Macromedia.com. (Note
that the URL prefix does not always need to point to localhost/. Right now, we are just using localhost
as the troubleshooting web site. The important thing is for “URL prefix” to point to the document root
address of whichever testing web site you are connecting to.)
2) Make sure that the MySql extension is activated in php.ini. Take the ; off the left side of the line in order
to activate: extension=php_mysql.dll
3) Make sure that extension_dir = “c:\php\ext” is activated in php.ini, and that it points to the correct
directory where php_mysql.dll is located.
For PHP5: extension_dir = “c:\php\ext”
For PHP4: extension_dir = “c:\php" Use this if you followed PHP4 installation instructions and
copied all the extensions from c:\php\extensions to c:\php.
4) Make sure that PHP is working in Apache server. Does browsing to your localhost/phpinfo.php
page display PHP graphics and data?
BLANK PAGES AND ERROR CODES IN DREAMWEAVER
The Dreamweaver Tutorial has you create PHP code on two pages: comments-view.php and comments-
add.php. The problem is that after you complete the tutorial instructions, both pages display as blank
pages in your Internet browser.
If you’re working on those pages in Dreamweaver, when you click on “Live Data View” you get the
following error code:
The testing server did not execute any of the scripts in your document. Possible explanations include:
1) The testing server is not running.
2) The testing server ignores files with the ".php" file extension.
3) Your document does not contain any scripts.
This is caused by a parsing problem in PHP, i.e the PHP code hangs up and your Apache server gives
you a blank page. The solution is to make a change in the php.ini file. Change short_open_tag = on to
make it read: short_open_tag = off
Good luck. I hope this helps.
REFERENCE: www.thriftyplaces.com/html/dreamweaver__mysql__php___apac.html
1) In Dreamweaver, go to Sites/Manage Sites/Advanced, in “Testing Server,” be sure to configure URL
prefix: localhost/ .... See Check the URL Prefix in the Site Definition at Macromedia.com. (Note
that the URL prefix does not always need to point to localhost/. Right now, we are just using localhost
as the troubleshooting web site. The important thing is for “URL prefix” to point to the document root
address of whichever testing web site you are connecting to.)
2) Make sure that the MySql extension is activated in php.ini. Take the ; off the left side of the line in order
to activate: extension=php_mysql.dll
3) Make sure that extension_dir = “c:\php\ext” is activated in php.ini, and that it points to the correct
directory where php_mysql.dll is located.
For PHP5: extension_dir = “c:\php\ext”
For PHP4: extension_dir = “c:\php" Use this if you followed PHP4 installation instructions and
copied all the extensions from c:\php\extensions to c:\php.
4) Make sure that PHP is working in Apache server. Does browsing to your localhost/phpinfo.php
page display PHP graphics and data?
BLANK PAGES AND ERROR CODES IN DREAMWEAVER
The Dreamweaver Tutorial has you create PHP code on two pages: comments-view.php and comments-
add.php. The problem is that after you complete the tutorial instructions, both pages display as blank
pages in your Internet browser.
If you’re working on those pages in Dreamweaver, when you click on “Live Data View” you get the
following error code:
The testing server did not execute any of the scripts in your document. Possible explanations include:
1) The testing server is not running.
2) The testing server ignores files with the ".php" file extension.
3) Your document does not contain any scripts.
This is caused by a parsing problem in PHP, i.e the PHP code hangs up and your Apache server gives
you a blank page. The solution is to make a change in the php.ini file. Change short_open_tag = on to
make it read: short_open_tag = off
Good luck. I hope this helps.
REFERENCE: www.thriftyplaces.com/html/dreamweaver__mysql__php___apac.html