On Sat, 01 Feb 2003 10:26:10 -0600 [EMAIL PROTECTED] (Cditty) wrote:

> A co-worker is teaching me to move to the next level in php. I have
> started using associative arrays for my scripts, but I am having a problem
> using them to do an insert into MySQL. Can someone give me an example of
> how to do an insert to the database using these arrays? My array is
> this...$item['itemID']

try something like that:

<other-code ... i.e. connecting and so on>
mysql_query("INSERT INTO items SET itemcolumn='".$item['itemID']."'");

or just

mysql_query("INSERT INTO items (itemcolumn) VALUES('".$item['itemID']."')");



Regards,

-- 
Thomas Seifert

mailto:[EMAIL PROTECTED]
http://www.MyPhorum.de 

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

Reply via email to