View Single Post
  #4 (permalink)  
Old 2007-06-25, 05:28 PM
ldivinag ldivinag is offline
Junior Member
 
Join Date: Jun 2007
Posts: 1
ldivinag is on a distinguished road
Default

usually, when i issue a

Code:
$result = mysql_query ($sql);
next block of code is

Code:
if (!$result)  //  meaning that there was an error in the SQl statement...
{
  echo ("SQL: " . $sql . "\n";
  echo ("mysql_error() . ": " . mysql_errno() . "\n");
  die;
}
that way, it echoes the SQl statement so i can paste it into my fav mysql client and further view it.

plus, it dumps the mysql error # and message.
Reply With Quote