Topic: Problem with adding a new Group

I receive the Error

Unable to add group

when i try to add a new group...

i have added 1 mod that could possiby change this and that is the Group Colored username mod. Where people in certain groups have different colored names.

if i edit an existing group the colored names work fine.

here is the query i am using

$db->query('INSERT INTO '.$db->prefix.'groups (g_title, g_user_title, g_read_board, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood, g.color) VALUES(\''.$db->escape($title).'\', '.$user_title.', '.$read_board.', '.$post_replies.', '.$post_topics.', '.$edit_posts.', '.$delete_posts.', '.$delete_topics.', '.$set_title.', '.$search.', '.$search_users.', '.$edit_subjects_interval.', '.$post_flood.', '.$search_flood.')') or error('Unable to add group', __FILE__, __LINE__, $db->error());

Here is the code for the Color input box

<input type="text" name="group_color" size="9" maxlength="7" value="<?php echo $group['g_color'] ?>" tabindex="25" />

Is there an obvious mistake that i have missed anywhere?

thanks if you can help

2 (edited by elbekko 2006-08-21 17:10)

Re: Problem with adding a new Group

Try changing g.color to color or g_color

Re: Problem with adding a new Group

Nope Still Doesn't Work

Re: Problem with adding a new Group

The number of columns in both sets of () in an SQL query must match. I believe the second set is one short wink

Re: Problem with adding a new Group

Enable debug mode.

Re: Problem with adding a new Group

Moved to "Modifications" since this is related to a mod.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Problem with adding a new Group

Can anyone offer any help? i've been trying but i still can't figure it

Re: Problem with adding a new Group

Like elbekko said, enable debug mode, and like he forgot to say, paste the full error here.

Looking for a certain modification for your forum? Please take a look here before posting.