Welcome to Geeklog, Anonymous Tuesday, December 24 2024 @ 08:40 am EST
Geeklog Forums
SQL Problems - seen before! Please Help!
Idorafan
Anonymous
I've searched these forums up and down... I see lots of similar problems, but none of the fixes ive tried seem to work...
I have the typical SQL error, see error.log for details
and then
Mon 17 Sep 2007 21:49:25 GMT+4 - 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 '' at line 1. SQL in question: SELECT DISTINCT ft_name FROM gl_access,gl_features WHERE ft_id = acc_ft_id AND acc_grp_id IN ()
I know its a problem with my user groups...
All group list provide results except for logged in users and all users (from the admin > group manager > memberlists)
Any ideas what changes I need to make to my gl_group_assignments table?
Or is the solution something completely different?
Thanks so much for everyones help!!!
I have the typical SQL error, see error.log for details
and then
Mon 17 Sep 2007 21:49:25 GMT+4 - 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 '' at line 1. SQL in question: SELECT DISTINCT ft_name FROM gl_access,gl_features WHERE ft_id = acc_ft_id AND acc_grp_id IN ()
I know its a problem with my user groups...
All group list provide results except for logged in users and all users (from the admin > group manager > memberlists)
Any ideas what changes I need to make to my gl_group_assignments table?
Or is the solution something completely different?
Thanks so much for everyones help!!!
12
13
Quote
Status: offline
mevans
Forum User
Full Member
Registered: 02/08/04
Posts: 393
Location:Texas
Have you looked at this topic? Near the end you will see a small script you can create on your site that should get you going again.
Thanks!
Mark
Thanks!
Mark
10
11
Quote
Idorafan
Anonymous
mevans , Thank you for your help, but I'm still having problems - after editing, uploading, and running that script, i get the following error:
Parse error: syntax error, unexpected T_VARIABLE in /home/downtown/public_html/fixdb.php on line 14
Any other ideas?
Parse error: syntax error, unexpected T_VARIABLE in /home/downtown/public_html/fixdb.php on line 14
Any other ideas?
10
14
Quote
Status: offline
mevans
Forum User
Full Member
Registered: 02/08/04
Posts: 393
Location:Texas
Make sure you read the post following my code, there was a small error that is documented. If you are still having problems, cut and paste your fixdb.php here (place it between [ code ] blocks so it will format properly and we'll find the error.
13
14
Quote
Idorafan
Anonymous
lol, please don't think of me as a php moron...
the quote was For those who want to use that last code snippet be sure to move
the semicolon outside the double quotes on line 14 ($sql = ...)
the line is
semicolon = ; is currently outside of ($sql=)
Where am I going wrong???
the quote was For those who want to use that last code snippet be sure to move
the semicolon outside the double quotes on line 14 ($sql = ...)
the line is
Text Formatted Code
$result = @mysql_query($sql,$db);semicolon = ; is currently outside of ($sql=)
Where am I going wrong???
10
10
Quote
Status: offline
mevans
Forum User
Full Member
Registered: 02/08/04
Posts: 393
Location:Texas
Well, it is actually the line before that one that is wrong. Here is the corrected version:
<?php
$hostname = 'localhost';
$user = 'dbuserhere';
$pass = 'dbpasswdhere';
$dbname = 'dbnamehere';
// connect to the database
$db = mysql_connect($hostname,$user,$pass) or die('Cannot connect to DB server');
// Set the database
@mysql_select_db($dbname) or die('error selecting database');
$sql = "insert into gl_group_assignments (ug_main_grp_id, ug_uid) values (2,1)";
$result = @mysql_query($sql,$db);
echo 'Group assignment database updated - try site again...';
?>
Give this one a try and let's see if it works a little better.
Thanks!
Mark
Text Formatted Code
<?php
$hostname = 'localhost';
$user = 'dbuserhere';
$pass = 'dbpasswdhere';
$dbname = 'dbnamehere';
// connect to the database
$db = mysql_connect($hostname,$user,$pass) or die('Cannot connect to DB server');
// Set the database
@mysql_select_db($dbname) or die('error selecting database');
$sql = "insert into gl_group_assignments (ug_main_grp_id, ug_uid) values (2,1)";
$result = @mysql_query($sql,$db);
echo 'Group assignment database updated - try site again...';
?>
Give this one a try and let's see if it works a little better.
Thanks!
Mark
7
11
Quote
Idorafan
Anonymous
the script ran just fin, but when I go to my group manager and try to list both the "all users" member list and the "logged in users" member list, I get a page cannot be displayed error....
The list shows me (admin) for all other group lists...
For reference:
all users = grp_id=2
logged in users = grp_id=13
The list shows me (admin) for all other group lists...
For reference:
all users = grp_id=2
logged in users = grp_id=13
10
10
Quote
Idorafan
Anonymous
Well, I apparently haven't had the issue since I ran the script (not showing up on the error log) So thanks so much mevans!!!!!
12
14
Quote
All times are EST. The time is now 08:40 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content