28, May 2012

Problem with SQL - webmaster forum

 
Webdigity webmaster forums
[ 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: Problem with SQL
« previous next »
Pages: [1] Print

Author Topic: Problem with SQL  (Read 2136 times)
I crack Photoshop!
*
Posts: 3
22 credits
Members referred : 0


« on: Oct 10, 2006, 09:31:36 pm »

Im getting this error when i try to use register.php

You have an error in your SQL syntax near '-_nameofdb.users WHERE email = 'myemail@email.com' OR login = 'myusername'' at line 1

Not sure whats wrong.
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Oct 10, 2006, 09:54:40 pm »

check the info in 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.
define("USER_TABLE", DB_NAME.".users");
define("PROFILE_TABLE", DB_NAME.".users_profile");
define("COUNTRY_TABLE", DB_NAME.".countries"); // an optional table with countruy names and codes
define("SESSION_TABLE", DB_NAME.".sessions");

I crack Photoshop!
*
Posts: 3
22 credits
Members referred : 0


« Reply #2 on: Oct 11, 2006, 12:30:49 am »

:/ i did that already and it all seems ok....

PS: Thanks for the timely response
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: Oct 11, 2006, 06:40:36 am »

:/ i did that already and it all seems ok....

PS: Thanks for the timely response
does it work now?

I crack Photoshop!
*
Posts: 3
22 credits
Members referred : 0


« Reply #4 on: Oct 11, 2006, 02:44:15 pm »

Nope it still doesnt seem to work...
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #5 on: Oct 11, 2006, 04:17:56 pm »

Nope it still doesnt seem to work...
you server doesn't support this kind of table calls: dbname.tablename

remove the leading DB_NAME.". from the statements and uncomment the mysql_select_db function from the db_connect method (this is the information I posted before)

Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=4403
Tags : databases email Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: Problem with SQL
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 02:07:49 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!






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