abahaedini Posted August 17, 2012 Share Posted August 17, 2012 hi there I define a fixed varibale like this define('CODE', '123'); echo "result ==> ".CODE; result ==> 123 it's ok...but when I store the CODE in mysql and then fetch it dosn't worki get just this result: result ==> CODEbut I want this result:result ==> 123 is there any way to do it? Link to comment Share on other sites More sharing options...
birbal Posted August 17, 2012 Share Posted August 17, 2012 it seems like you are using CODE constant (right word is constant not fixed variable) in string context. showing the code will be helpfull Link to comment Share on other sites More sharing options...
dmllc Posted August 24, 2012 Share Posted August 24, 2012 what datatype is the column where 123 is pulled from? your code has it in a string, but more than likely it is stored in mysql as an int Link to comment Share on other sites More sharing options...
php_developer Posted August 25, 2012 Share Posted August 25, 2012 I think you must retrive the value of CODE in some variable like: $code = CODE; and then use $code in your mysql query like:insert into table (`code`) values ('$code').. May be this will help u... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now