Re: MySQL: How to properly extract fields from retrieved single record ???
| From: | Peter Beckman | Date: | Mon, 22 Sep 2003 12:22:25 +0000 |
| Subject: | Re: MySQL: How to properly extract fields from retrieved single record ??? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-30619@lists.php.net to get a copy of this message | ||
On Mon, 22 Sep 2003, -{ Rene Brehmer }- wrote:
> $result = mysql_query($query);
replace with:
$result = mysql_query($query) or die("MySQL Error:
".mysql_error()."\n<br/>SQL: ".$query);
If the query fails, you will see why the query failed, and be able to view
the query itself. Maybe $_POST['edit'] isn't set. Maybe you have a
problem in your SQL. Maybe the DB you are connecting to doesn't exist. I
would check your connection as well.
Beckman
---------------------------------------------------------------------------
Peter Beckman Internet Guy
beckman@purplecow.com http://www.purplecow.com/
---------------------------------------------------------------------------