Jump to content


Photo

weird sql + vars


  • Please log in to reply
1 reply to this topic

#1 birdie

birdie
  • Members
  • PipPipPip
  • Advanced Member
  • 65 posts
  • LocationBirmingham UK

Posted 22 June 2006 - 07:15 PM

hi, i'm having problems with this sql code, i just cant find the problem with it.

$sql = "INSERT INTO `matches` ( `opp` , `time` , `result` , `ip` , `username` ) VALUES ( '$opp' , '$time' , '$result' , '$ip' , '$username' )";

if i mysql_query() it, it doesnt insert. the vars are int, varchar with the limits well within boundarys.

Any ideas? thanks a lot [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]

#2 jvrothjr

jvrothjr
  • Members
  • PipPipPip
  • Advanced Member
  • 300 posts
  • LocationOhio

Posted 22 June 2006 - 08:27 PM


$sql = "INSERT INTO matches ( 'opp' , 'time' , 'result' , 'ip' , 'username' ) VALUES ( '$opp' , '$time' , '$result' , '$ip' , '$username' )";

its the quotes most of the time. I run into is all the time use phpadmin and to run sql querys have remove most of the qoutes it puts in
If you understand everything you know nothing!

http://rcchjr.awardspace.com/




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users