arrays are not a datatype for MySQL.

You have to serialize your array into a string. You must choose a suitable
delimitor that will not conflict with your data. Taking as an example ",":

$to_feed = implode( "," , my_array ) ;

$query = " update user_table set categories in '({$to_feed})' where
userid='1' " ;

HTH
Ignatius
____________________________________________
----- Original Message -----
From: "James Meers" <[EMAIL PROTECTED]>
To: "PHP Helplist Windows" <[EMAIL PROTECTED]>
Sent: Friday, October 25, 2002 1:39 PM
Subject: [PHP-WIN] MySQL Query


> i want to update a field and add an array, this is what i have so far,
however it doesnt work, can anyone help?
>
> update user_table set categories in ('5','6') where userid='1'
>
>
>
> James
>
>


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

Reply via email to