Reply
mySQL submit error
Old 04-21-2004, 01:11 AM mySQL submit error
wipeout's Avatar
Skilled Talker

Posts: 90
Location: Canada
Ok I am writing a new member script and I have the following code.. but on sbmit everythin checks out except line 118 has a prase error?
PHP Code:
$query "INSERT INTO user_main(email_address, username, password, signup_date, email2, email) VALUES('$email_address', '$username', '$db_password', $signup_date, '$email2', '$email')"
its kinda important oviosly its my acctualy submit to mySQL part and I donno whats wrong...

Chroder? lol
__________________
PHP Code:
<?
  $User 
'wipeout'
  
$Class 'zombie'

  
phpGroupy('$User, da ,$Class')
?>
wipeout is offline
Reply With Quote
View Public Profile Visit wipeout's homepage!
 
When You Register, These Ads Go Away!
     
Old 04-21-2004, 02:07 AM
Jcgeuze's Avatar
Skilled Talker

Posts: 93
Location: The Netherlands,
you have to add a ; behind every line
Jcgeuze is offline
Reply With Quote
View Public Profile Visit Jcgeuze's homepage!
 
Old 04-21-2004, 03:11 AM
wipeout's Avatar
Skilled Talker

Posts: 90
Location: Canada
OMG...
Well I feel dumb...
I think that was the one stupid minute thing I didn't think to check...
Meh..

Thanks man
__________________
PHP Code:
<?
  $User 
'wipeout'
  
$Class 'zombie'

  
phpGroupy('$User, da ,$Class')
?>
wipeout is offline
Reply With Quote
View Public Profile Visit wipeout's homepage!
 
Old 04-21-2004, 12:32 PM
j0e
Average Talker

Posts: 23
Location: UK
Im pretty sure that you don't need a semi-colon on the end of SQL queries (i'll try and find where that was written), however the problem may be related to putting the date in. This depends what format it is... though I assume its probably not an integer, in which case you should have quotes around it.

Try this:
PHP Code:
$query="INSERT INTO user_main (email_address,username,password,signup_date,email2,email) VALUES('$email_address','$username','$db_password','$signup_date','$email2','$email')"
(There is not supposed to be spaces between 'email' and '2', but I can't get rid of them)

Here: according to php.net (http://uk.php.net/manual/en/function.mysql-query.php):
Quote:
Note: The query string should not end with a semicolon.

Last edited by j0e : 04-21-2004 at 12:37 PM.
j0e is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to mySQL submit error
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12017 seconds with 13 queries