Query from POST_VARS

From: Date: Wed, 03 Apr 2002 20:00:52 +0000
Subject: Query from POST_VARS
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-91378@lists.php.net to get a copy of this message
Question on a mysql insert query: while(list($key, $val) = each($HTTP_POST_VARS)) { $string .= "'". $val ."'" .","; } $insert_query = "insert into data_16 values ('$string')"; Do I need the single quotes for data being put into table? Ex: $insert_query =('data' , 'data2', 'data3') etc.... or can it be without the single quotes? as in (data, data2, data3) ??? As far as I understand I only need quotes here: $insert_query = "insert into data_16 values ('$string')"; ^ ^ Am i right?? thanks -ccma

« previous php.general (#91378) next »