Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6
Author Message
roodie
New Member
New Member



Joined: Jun 20, 2006
Posts: 10

PostPosted: Mon Oct 23, 2006 7:56 am Reply with quote

Ok heres the deal, if i try to register thru the forum i get an insert error.

Only registered users can see links on this board! Get registered or login!

and heres the error:
Quote:
Could not insert data into users table

DEBUG MODE

SQL Error : 1064 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 '23, 2006, 'english', 1, 0, 1, 0, 'f4a0e2')' at line 2

INSERT INTO nuke_users (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey) VALUES (89, 'test1', 1161607772, '827ccb0eea8a706c4c34a16891f84e7b', 'Frank_Wolferink@hotmail.com', '', '', '', '', '', '', '', '', 0, 0, '', '', '', 1, 1, 1, 1, 1, 0, 1, 1, 1, Oct 23, 2006, 'english', 1, 0, 1, 0, 'f4a0e2')

Line : 640
File : usercp_register.php

i have a bit noledge of SQL 2000 and i think its a date problem cause it tries to insert , Oct 23, 2006 ,

does anyone has an idea to get rid of the comma??

these are the variables in the insert and update statement, the update statement seems to be correct to me cause it converts the date before it insert? or am i on the wrong track?

insert statement.
Code:
'" . str_replace("\'", "''", $user_dateformat) . "' 


Update statement
Code:
user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "' 




thanks in advance
 
View user's profile Send private message
jakec
Site Admin



Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom

PostPosted: Mon Oct 23, 2006 11:00 am Reply with quote

This may be theme related. The register link in the forums should point to the Nuke function for this.

Was your theme designed for use on PHP Nuke Platinum, or Evolution?

I'm probably wrong, but worth a stab. Laughing
 
View user's profile Send private message
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Mon Oct 23, 2006 12:04 pm Reply with quote

What BBToNuke uses is $reg_date

Try this

in includes/usercp_register.php
Code:


, $reg_date,

TO

, " . addslashes($reg_date) . ",

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
roodie







PostPosted: Tue Oct 31, 2006 6:06 am Reply with quote

didnt work!! does anyone know in what files these forum links are declared, then i just change it to your account login screen.

thanks in advance,
 
evaders99







PostPosted: Tue Oct 31, 2006 8:50 am Reply with quote

Hmm may need something more powerful mysql_escape_string

Code:


, " . mysql_escape_string($reg_date) . ",


I generally remove the forums login box from the template index_body.tpl
 
gregexp
The Mouse Is Extension Of Arm



Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Tue Oct 31, 2006 1:40 pm Reply with quote

Just my thoughts :

Oct 23, 2006 has a comma in it, wouldnt the sql try to break it up unless it was in quotes? I think it is trying to break it up and causing the error.

Im on vacation so I hope someone will look into this idea.

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
evaders99







PostPosted: Tue Oct 31, 2006 2:40 pm Reply with quote

Doh I'm dumb

Code:


, '$reg_date',


Single quotes are needed. That is all
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©