ProAnswers.org

How to execute an sql query? How to fetch its result ?

$my_qry = mysql_query("SELECT * FROM users WHERE u_id=‘1’; "); $result = mysql_fetch_array($my_qry); echo $result[‘First_name’]; Write a program using while loop $my_qry = mysql_query("SELECT * FROM users WHERE u_id=‘1’; “); while($result = mysql_fetch_array($my_qry)) { echo $result[‘First_name’.].”
"; }