Home :: Forums :: Downloads :: Shop

sql insert problem with columns named one,two,three

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb   More...
#1Wed Dec 13, 2006 10:04 pm   sql insert problem with columns named one,two,three
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 8 year's 8 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 32
Website: www.clanthemes.com
Status: Offline
Joined: Feb 26, 2006
0.17 posts per day
Posts: 520
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
This is a strange question.

I have an insert and the columns are name one, two, and three.

It will not go, but if I just use "the one column" it works. Is there any reason for this?


$rid = intval($rid);
$rtitle = strip_tags($rtitle);
$one = strip_tags($one);
$two = strip_tags($two);
$three = strip_tags($three);
$sql = "INSERT INTO ".$prefix."_server_rules (`rid`,`rpos`,`rtitle`,`rdetails`,`one`,'two','three') VALUES ('NULL','NULL','$rtitle','$rdetails','$one','$two','$three')";
$db->sql_query($sql) or die ('Could not insert into table');


Anyone see anything wrong?


Back to top Reply with quote
#2Sat Dec 16, 2006 2:07 am   re: sql insert problem with columns named one,two,three
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 8 year's 8 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 32
Website: www.clanthemes.com
Status: Offline
Joined: Feb 26, 2006
0.17 posts per day
Posts: 520
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
I figured this out.

In the above case my one two and three fields where inside the loop. Therefor it was only returning one of those values.



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb   More...
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum