"Kurth Bemis" ...
> At 12:31 PM 1/26/2001, Krznaric Michael wrote:
>
> sorry - here you all go..
>
>
> // number crunching time
> $count++;
> $time = date("Y-m-d H:i:s");
>
> $result = mysql_query("INSERT INTO links (count) VALUES $count WHERE
lid=$id");

> >i'm having a horrible time updating 2 fields in the same db.  I don't get
> >an error but the fields aren't updated....can anyone send me a snippet
for
> >the to learn from?

well, if you want to UPDATE fields into a database, then PLEASE NOT INSERT
data...

that code should look:

$result = mysql_query("UPDATE links (count) VALUES ($count) WHERE lid=$id");

i suppose that you are getting $count from the DB before doing $count++; ...

and also have a look at the data types of that table... if the column
'count' is not of NUMBER type, you'll need some quotes in the query... also
applies for the lid.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to