Reply to Re: DB cuts off data

Your name:

Reply:


Posted by Ruben van Engelenburg on 01/11/07 10:55

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.

[Back to original 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

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