You are here: Re: DB cuts off data « All PHP « IT news, forums, messages
Re: DB cuts off data

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация