Re: Query was empty - Strange problem
| From: | Stephen Johnson | Date: | Thu, 17 Mar 2005 06:36:13 +0000 |
| Subject: | Re: Query was empty - Strange problem | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-38942@lists.php.net to get a copy of this message | ||
I do not see where you are populating $Query --> therefore your query would be empty --
On Mar 16, 2005, at 10:30 PM, Vinayakam Murugan wrote:
Hi I have an application in which i am connecting to three different databases. I have three connect and query procedure. I am facing problems with one of these databases. -------------------------------------------------------------------------------------------------------------------------------Stephen Johnson stephen@thelonecoder.com http://www.thelonecoder.com --continuing the struggle against bad code-- *********$Conn = mysql_pconnect($Hostname,$Loginname,$Passwd);$Ret = mysql_select_db ($Dbname, $Conn);if (!$Ret) { $Error = "Error opening Database : $Dbname <BR>"; return FALSE; }$Ret = mysql_query ($Query, $Conn) or $Error = "<BR><BR>" .mysql_errno() . "---" . mysql_error() . "<BR><BR>";echo $Error; -------------------------------------------------------------------------------------------------------------------------------I am getting an Error - Query was empty. I have tried echoin $Query before and after the mysql_query. It shows a proper query which if I copy and execute in phpmyadmin, i get the required results. It is not workign through PHP only. Any pointers would be very helpful. --Warm Regards ~~~~~~~~~~~~ Vinayak --PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php *********