PHP/SQL cannot get the value of a field name containing a forward slash -


i have field named role/position problem cannot call using code:

$sqlposition = "select distinct `role/position` document                   `typeid`='$row2->typeid' , `appid`='$id1' "; $resultposition = mysql_query($sqlposition, $con); while ($rowposition = mysql_fetch_object($resultposition)){     echo $rowposition->role/position; } 

i error dividing zero. if use backticks, curly brackets, or combination thereof, still not work. should use call field?

you can use mysql_fetch_array instead of mysql_fetch_object like

while ($rowposition = mysql_fetch_array($resultposition)){     echo $rowposition['role/position']; } 

and please follow mysql rules while creating fields.look link


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -