|  | Posted by Dave Nash on 01/11/07 11:00 
On Thu, 11 Jan 2007 11:55:30 +0100, Ruben van Engelenburg<nospam@nospam.com> wrote:
 
 >Dave Nash wrote:
 >
 >> <?php
 >> $query="UPDATE categories SET catname='$ud_catname',
 >> image='{$ud_image["name"]}', parentid='$parentid'  WHERE
 >> catid='$ud_catid'";
 >> @mysql_select_db($database) or die( "Unable to select database");
 >> mysql_query($query);
 >> echo "  <table width=\"100%\" border=\"0\" cellspacing=\"1\"
 >> cellpadding=\"3\">
 >>   <tr>
 >>     <th scope=\"col\"><div align=\"left\" class=\"textstandard\">The
 >> Category was succesfully edited</div></th>
 >>   </tr>
 >> </table>";
 >> ?>
 >
 >Hi Dave,
 >
 >You shouldn't surround values of numeric types with quotes in your query:
 >
 >$query="UPDATE categories SET catname='$ud_catname',
 >image='{$ud_image["name"]}', parentid=$parentid  WHERE
 >catid=$ud_catid";
 >
 >Also echo your $query variable before executing it, to see what you're
 >sending to the database server. There's probably simply an error in your
 >$ud_image array.
 >
 >Ruben.
 
 Call me silly but how do I echo the query?
  Navigation: [Reply to this message] |