News:

Wondering if this will always be free?  See why free is better.

Main Menu

Update problem in MySQL

Started by Cadish, August 28, 2004, 04:26:49 PM

Previous topic - Next topic

Cadish

Hi,

I have to update something in my database. The text I want to update looks like this:
    <table cellpadding="0" cellspacing="0" width="100%">
     <tr align="center">
      <td>19&deg;C</td>
      <td>19&deg;C</td>
      <td>19&deg;C</td>
     </tr>
    </table>


The query to update the database looks like this:

db_query("
UPDATE {$db_prefix}mod
SET text = " . $string . "
WHERE id = $id
LIMIT 1", __FILE__, __LINE__);


Why is it giving me an error everytime I want to run the script? What's wrong?
I've tried to encode the $string with htmlspecialchars($string) and more things like this, but nothing helps...

Any help appreciated ;)
Cadish

[Unknown]

SET text = '$string'

-[Unknown]

Cadish

:-[ :-[ :-[ :-[

Why do I feel like a stupid fool??

Thanks dude!

Advertisement: