This is my code:
if ($stmt = $mysqli->prepare ( "SELECT album_no, album_name FROM $albumTable WHERE b_username=? parent_name=? LIMIT 100" ))
{
$stmt->bind_param ( "ss", $a_owner,$p_name); // bind parameters for markers
$stmt->execute ();
$stmt->bind_result ($album_no,$album_name ); // bind result variables
$stmt->fetch (); /* fetch value */
if (isset ( $album_no ))
{
$array = array();
$array['album_no'] = $album_no;
$array['album_name'] = $album_name;
}
/* close statement */
$stmt->close ();
}
/* close connection */
$mysqli->close ();
and it works, the only problem is it returns just one row... I know I need a while() to go through the other rows but I just don't know where to put that while when using prepared statements :( searching the docs I find "fetchAll()" but that seems to only work with "PDO" and I have no idea what PDO is :(
Thanks in advance