Ask a Question related to PHP Development, Design and Development.
-
Didier McGillis #1
HELP about pull hair on this INSERT
About to yank some hair, and I have very little left. Can some one look at
my code, then the message I get and see what I am missing, I am at wits end,
this is something that is not new to me but I am missing and I cant see it.
Included is code, message and table structure.
################################################## #####
CODE:
// query to inset data into database
if ($submit) {
$bmenu=addslashes($bmenu);
$tmenu=addslashes($tmenu);
$parent=addslashes($parent);
$name=addslashes($name);
$desc=addslashes($desc);
$g_desc=addslashes($g_desc);
$sort_order=addslashes($sort_order);
$status=addslashes($status);
$image=addslashes($image);
$mb=addslashes($mb);
$calendar=addslashes($calendar);
$agiQuery="INSERT INTO group (id, bmenu, tmenu, parent, name, desc, g_desc,
sort_order, status, image, mb, calendar) ";
$agiQuery.="VALUES ('', '".$bmenu."', '".$tmenu."', '".$parent."', '$name',
'$desc', '$g_desc', '".$sort_order."', '".$status."', '$image', '".$mb."',
'".$calendar."');";
$agiQuery.="";
print "<p>$agiQuery</p><br>\n";
$agiResult = mysql_query($agiQuery) or die("Invalid query: " .
mysql_error());
if (!$agiResult){
print "<p>hey! insert failed.</p><br>\n";
}
print "<p>insert sucess!</p><br>\n";
}
################################################## #####
################################################## ###########
MESSAGE:
INSERT INTO group (id, bmenu, tmenu, parent, name, desc, g_desc, sort_order,
status, image, mb, calendar) VALUES ('', '1', '1', '0', 'FBC Administrator',
'fdhsjfds jfdash', 'jhfdjs fjdsahfjksda hfjdsha fjdskah fjdsha fdshajf dsa
h', '4', '1', 'fdjshafjdash', '1', '1');
Invalid query: 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
'group (id, bmenu, tmenu, parent, name, desc, g_desc, sort_order
################################################## ############
################################################## ###
TABLE:
CREATE TABLE group (
id int(4) NOT NULL auto_increment,
bmenu int(1) NOT NULL default '0',
tmenu int(1) NOT NULL default '0',
parent int(3) NOT NULL default '0',
name text NOT NULL,
desc text NOT NULL,
g_desc text NOT NULL,
sort_order int(3) NOT NULL default '0',
status int(1) NOT NULL default '0',
image text NOT NULL,
mb int(1) NOT NULL default '1',
calendar int(1) NOT NULL default '1',
PRIMARY KEY (id)
) TYPE=MyISAM;
################################################## ###
__________________________________________________ _______________
Add photos to your messages with MSN 8. Get 2 months FREE*.
[url]http://join.msn.com/?page=features/featuredemail[/url]
Didier McGillis Guest
-
tearing my hair out...
This is probably something simple, but, I cannot for the life of me figure this out - please look at http://www.kevincrowepottery.com/firing.htm ... -
dynamic pull-down based on another pull-down
Greetings, is there a tech doc somewhere to show: 1) 2 pull-downs, dynamically loaded from two record sets. first is "State" and next is "City"... -
clipping around hair??
I have an image which i need to cutout and it needs to be placed in quark on a gradient colour background. The image is of a girl with long hair.... -
Hair Brushes
Hi people, can anyone give me any tips for creating hair brushes? I'm trying to create hair similar to these: ... -
[PHP] HELP about pull hair on this INSERT
Didier McGillis wrote: GROUP and DESC are reserved words. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/



Reply With Quote

