sql - php look in database for data not working -


i'm making quiz webpage connected datbase, code isn't working. have code:

    $query = "select `question` `questions` `id` = '1'";     $result = mysql_query($query) or die($query."<br/><br/>".mysql_error());     $question = mysql_result($result, 0);     echo $question; 

it should in table question id 1 , echo question, possible answers , correct answer. column names are: id, question, a, b, c, d , correct

here how looks in phpmyadmin, since im not allowed post images, here link image. http://i.stack.imgur.com/tnjkd.png

can me???

try this

$query = "select `question` `questions` `id` = '1'";     $result = mysql_query($query) or die($query."<br/><br/>".mysql_error());     $question = mysql_result($result, 0);     echo $question['question']; 

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -