Page 1 of 1

MySQL Query problem?

Posted: Fri Nov 29, 2002 1:38 pm
by Rob_Beard
Hey all,

Can someone please tell me what i've done wrong here? I've looked around the sql and php manuals like crazy, and i cant find it.

Code: Select all

<?php
$query = "INSERT INTO Users (user_number,user_name,password,realname,company,
    address1,address2,address3,postcode,country,
    phone,fax,email,domain,paymentdate,percentdone,
    domain_reg,webspace,content,assignment,template,
construction)
VALUES((Null), ($user), ($pass), ($name), ($company), ($address1), 
($address2), ($address3), ($postcode), ($country), ($phone), ($fax), 
($email), ($domain), ($paymentdate), ($percentdone), 
($domain_registered), ($webspace), ($content), ($assignment), 
($template), ($construction));";

   $result = mysql_query($query, $connection) or die(mysql_error());
?>

Posted: Fri Nov 29, 2002 4:07 pm
by mydimension
try taking out the parentesis around each value. you should only need on set around the entire list.