In message <[EMAIL PROTECTED]>, Wade Smart
<[EMAIL PROTECTED]> writes
>07052006 1845 GMT-6
>
>Im still having a bit of a problem with this insert. 
>
>Im using the double quotes but this is the error: 
>
>Players(fname,lname,address,city,state,zip,phhome,) 
>VALUES (Bob,Smith,123 On Some Street, Batesville, OG, 01235, 333-222-1111,)
>Insert error: "You have an error in your SQL syntax. 
>Check the manual that corresponds to your MySQL server version for the 
>right syntax to use near 
>')VALUES (Bob,Smith,123 On Some Street, Batesville, OG, 01"
>
>Thats all it gives. It just stops though. 
>
>wade

Your data still isn't in quotes...
VALUES ('Bob','Smith','123 On Some Street', ....

PLUS you have a spare comma at the end,
>333-222-1111,)


>
>
>On Mon, 2006-07-03 at 19:47 -0500, Mike Brandonisio wrote:
>> Hi,
>> 
>> You need to encapsulate your data in quotes. I would have done it  
>> like this with double quotes, single quote passed to query.
>> 
>> $query = "INSERT INTO Players (fname, lname, address, city, state,  
>> zip, phhome, phcell, phwork, other, email)";
>> $query .="VALUES (';
>> $query .=" '".$_POST['fname']."', '".$_POST['lname']."', '".$_POST 
>> ['address']."',";
>> $query .=" '".$_POST['city']."', '".$_POST['state']."', '".$_POST 
>> ['zip']."',";
>> $query .=' '".$_POST['phhome']."', '".$_POST['phcell']."',";
>> $query .=" '".$_POST['phwork']."', '".$_POST['other']."', '".$_POST 
>> ['email']."' ";
>> $query .=" )";
>> 
>> Sincerely,
>> Mike

-- 
Pete Clark

Free advertising for your website, business, or organisation at:
http://www.hotcosta.com/resources.php







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/HKFolB/TM
--------------------------------------------------------------------~-> 

Community email addresses:
  Post message: php-list@yahoogroups.com
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to