PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Author Message
roodie
New Member
New Member


Joined: Jun 20, 2006
Posts: 10

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

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 to the forums!


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: 3038
Location: United Kingdom

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

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 Back to top

What BBToNuke uses is $reg_date

Try this

in includes/usercp_register.php
Code:

, $reg_date,

TO

, " . addslashes($reg_date) . ",
View user's profile Send private message Visit poster's website
roodie
New Member
New Member


Joined: Jun 20, 2006
Posts: 10

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

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,
View user's profile Send private message
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

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

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
View user's profile Send private message Visit poster's website
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 Back to top

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.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

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

Doh I'm dumb

Code:

, '$reg_date',


Single quotes are needed. That is all
View user's profile Send private message Visit poster's website
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.

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum