5, September 2008

SQL syntax error - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: SQL syntax error
« previous next »
Pages: [1] Print

Author Topic: SQL syntax error  (Read 1040 times)
Kill the googlebot
*
Posts: 6
44 credits
Members referred : 0


« on: May 18, 2007, 04:53:05 PM »

hallo @all,

i'm testing with the new version (16-05-2007) of class, but all time i get this error by testing the login.php:

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 '-usermanager.users WHERE BINARY login = 'administrator' AND pw = 'c055ca7ac876e8' at line 1

and for register.php:

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 '-usermanager.users WHERE email = 'testman@abc.com' OR login = 'testman'' at line 1

Please, have somebody a tip for me, what is false?
thank you!
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8037
41179 credits
Members referred : 3



« Reply #1 on: May 18, 2007, 04:58:16 PM »

I guess that - is the problem Smiley

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : MIA - Where Nick and Tim
Kill the googlebot
*
Posts: 6
44 credits
Members referred : 0


« Reply #2 on: May 18, 2007, 05:23:56 PM »

thank you very much!

your tip is right!
my database name was "ew-usermanager" and the "-" was probably the problem.
now, i did rename the db to "usermanager" and all is running.

thank you for the very quick answer!
Google dot what?
*
Posts: 2
16 credits
Members referred : 0


« Reply #3 on: Jul 20, 2007, 06:24:14 AM »

I am trying to register the user with your version 1.97

my host provider doesn't allow me to change this part of my database tables name

<site name>_com_-_<table name> is the format, how do i get around this? explicitly list the value in the class?

Code:
'-_example.users1 WHERE email = 'test@test.com' OR login = 'test'' at line 1

I have a phpNuke site running also on this site (a few of them) as well, and they have the database name with the dash in it and it works just fine... what's going on here?
« Last Edit: Jul 20, 2007, 07:21:45 AM by elkidogz »
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6309
38674 credits
Members referred : 374


It's time to use PHP5!


« Reply #4 on: Jul 20, 2007, 09:51:28 AM »

I am trying to register the user with your version 1.97

my host provider doesn't allow me to change this part of my database tables name

<site name>_com_-_<table name> is the format, how do i get around this? explicitly list the value in the class?

Code:
'-_example.users1 WHERE email = 'test@test.com' OR login = 'test'' at line 1

I have a phpNuke site running also on this site (a few of them) as well, and they have the database name with the dash in it and it works just fine... what's going on here?

check this part from the class:

inside the config file:
// these are the names for the standard table names
// !!! Important
// It's possible that your server doesn't allow the database name inside a query
// if this forms a problem don't use them here and unescape the mysql_select_db() function
// inside the connect_db() method.

inside the class file:
   function connect_db() {
      $conn_str = mysql_connect(DB_SERVER, DB_USER, DB_PASSWORD);
      mysql_select_db(DB_NAME); // if there are problems with the tablenames inside the config file use this row
   }


Last blog : Is your website is down? Know before your visitors do!
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=6585
Tags : syntax error sql Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: SQL syntax error
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Sep 05, 2008, 07:37:13 PM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 36.294
Total Topics: 7.477
Total Members: 3.899
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: speedy5044

21 Guests, 3 Users online :

14 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.