SQL question

paruhd0x

Diamond Member
Apr 2, 2000
3,100
0
0
I'm editing my SQL database so I can add the color names feature on my msg board... I'm stuck though on one of the instructions I am supposed to follow.

Here is what I am supposed to do:

INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_custom_color', '250');

Here is a pic of what I have to work with... (I'm using phpmyadmin through cpanel)

SQL question

Any help is appreciated!
 

ISAslot

Platinum Member
Jan 22, 2001
2,890
108
106
Have you tried running the sql statement from the "Run SQL query/queries on database " box on the home db page?
 

BCYL

Diamond Member
Jun 7, 2000
7,803
0
71
The screen you provided is editing the table attributes... You cannot run the SQL Command from there...
 

dawks

Diamond Member
Oct 9, 1999
5,071
2
81
I think allow_custom_color should go in "Length/Values*" column, and the number '250' should go in 'Values' column ?
 

paruhd0x

Diamond Member
Apr 2, 2000
3,100
0
0
Originally posted by: ISAslot
Have you tried running the sql statement from the "Run SQL query/queries on database " box on the home db page?

I got an invalid syntax error... not sure what I'm supposed to run in it exactly...
 

paruhd0x

Diamond Member
Apr 2, 2000
3,100
0
0
Originally posted by: BCYL
The screen you provided is editing the table attributes... You cannot run the SQL Command from there...

Can you direct me to where I am supposed to be? =)
 

jonmullen

Platinum Member
Jun 17, 2002
2,517
0
0
Originally posted by: paruhd0x
Originally posted by: ISAslot
Have you tried running the sql statement from the "Run SQL query/queries on database " box on the home db page?

I got an invalid syntax error... not sure what I'm supposed to run in it exactly...

There should be a place that lets you run an SQL statement aginst the db. Try this and post the results.

"SELECT * FROM phpbb_config"
 

paruhd0x

Diamond Member
Apr 2, 2000
3,100
0
0
I think I figured it out. We'll see in 10 minutes when I finish editing the php on my boards.
 

paruhd0x

Diamond Member
Apr 2, 2000
3,100
0
0
Failed to update general configuration for ('allow_custom_color', '250')

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near 'allow_custom_color', '250')' WHERE config_name = '('allow_custom_color', '25' at line 2

UPDATE phpbb_config SET config_value = '('allow_custom_color', '250')' WHERE config_name = '('allow_custom_color', '250')'

Line : 62
File : /home/paradox/public_html/bb/admin/admin_board.php

Uh oh. Now i'm stuck :(
 

paruhd0x

Diamond Member
Apr 2, 2000
3,100
0
0
Originally posted by: jonmullen
Originally posted by: paruhd0x
Originally posted by: ISAslot
Have you tried running the sql statement from the "Run SQL query/queries on database " box on the home db page?

I got an invalid syntax error... not sure what I'm supposed to run in it exactly...

There should be a place that lets you run an SQL statement aginst the db. Try this and post the results.

"SELECT * FROM phpbb_config"

I ran that and got this:

Database paradox_xmb3 - Table phpbb_config running on localhost

Error

SQL-query :

"SELECT * FROM phpbb_config"

MySQL said:

You have an error in your SQL syntax near '"SELECT * FROM phpbb_config"' at line 1
 

BCYL

Diamond Member
Jun 7, 2000
7,803
0
71
Originally posted by: paruhd0x
Failed to update general configuration for ('allow_custom_color', '250')

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near 'allow_custom_color', '250')' WHERE config_name = '('allow_custom_color', '25' at line 2

UPDATE phpbb_config SET config_value = '('allow_custom_color', '250')' WHERE config_name = '('allow_custom_color', '250')'

Line : 62
File : /home/paradox/public_html/bb/admin/admin_board.php

Uh oh. Now i'm stuck :(

You need to run this:

UPDATE phpbb_config SET config_value = '250' WHERE config_name = 'allow_custom_color'


 

BCYL

Diamond Member
Jun 7, 2000
7,803
0
71
Originally posted by: paruhd0x
Originally posted by: jonmullen
Originally posted by: paruhd0x
Originally posted by: ISAslot
Have you tried running the sql statement from the "Run SQL query/queries on database " box on the home db page?

I got an invalid syntax error... not sure what I'm supposed to run in it exactly...

There should be a place that lets you run an SQL statement aginst the db. Try this and post the results.

"SELECT * FROM phpbb_config"

I ran that and got this:

Database paradox_xmb3 - Table phpbb_config running on localhost

Error

SQL-query :

"SELECT * FROM phpbb_config"

MySQL said:

You have an error in your SQL syntax near '"SELECT * FROM phpbb_config"' at line 1

You do not need the double-quotes in the select statement... so just:

select * from phpbb_config

is fine...

EDIT: Seems like you dont know anything about SQL... maybe you should try doing some reading on it before using it...
 

paruhd0x

Diamond Member
Apr 2, 2000
3,100
0
0
Oh well, I gave up and did a SQL database restore and phpbb restore. I'll try again later.

Of course I don't know any SQL, I'm just modding my phpbb... they tell you step by step what to do. Normally I don't have any problems.