"Jeffrey N Dyke" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> >$result=mysql_db_query("usr_172_1","UPDATE artikel SET Preis='\$preis\'
> WHERE ID='\$id\'");
> >//mysql_error($result);
>
> Here you're escaping the $ and then the ', have you tried....
>
> $result=mysql_db_query("usr_172_1","UPDATE artikel SET Preis='{$preis}'
> WHERE ID='{$id}'");
> with those escapes this is the actual query you're sending....
> "UPDATE artikel SET Preis='$preis\' WHERE ID='$id\'"

Good point, Jeff. As the id is probably an int one doesn't need quotes at
all:

"UPDATE artikel SET Preis='" . $preis . "' WHERE ID=" . $id

Regards,
Torsten

>
> HTH
> Jeff

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to