Saturday, 15 August 2015

php - How to put string variable at mysql_resutl field? -



php - How to put string variable at mysql_resutl field? -

i want run code :

if ($_get['choose'] == 1) { $field = " 'col1' "; } else { $field = " 'col2 ' "; } echo mysql_result($result,0,$field);

unfortunately got false ??

try this

if ($_get['choose'] == 1) { $field = "col1"; } else { $field = "col2"; } echo mysql_result($result,0,$field);

php mysql sql

No comments:

Post a Comment