What\'s the best way with PHP to read a single record from a MySQL database? E.g.:
SELECT id FROM games
I was trying to find an answer in t
I could get result by using following:
$resu = mysqli_fetch_assoc(mysqli_query($conn, "SELECT * FROM employees1 WHERE pkint =58"));
echo ( "
". $resu['pkint']). "
" . $resu['f1'] . "
" . $resu['f2']. "
" . $resu['f3']. "
" . $resu['f4' ];
employees 1 is table name. pkint is primary key id. f1,f2,f3,f4 are field names. $resu is the variable shortcut for result. Following is the output:
58
Caroline
Smith
Zandu Balm