I figure this could be a hot topic and probably many have ask but i don't know how to name it correctly and i couldn't find it. It's better to ask you all.
$db = new DB_Example;
$query = "SELECT EXP_COM_NAME, EXP_HIRED_DATE from experience where CAN_ID = '$user->id'";
$result = $db->query($query);
:83 while ($row = mysql_fetch_array ($result)){
$query2 = sprintf ("select PRO_TITLE from project where CAN_ID='$user->id' and EXP_COM_NAME= '%s'", $row["EXP_COM_NAME"]);
$result2 = $db->query($query2);
while ($row2 = mysql_fetch_array ($result2)){
............
............
}
}
So here is the error
Warning: 6 is not a valid MySQL result
resource in /file on line 83
I use PHPLIB as the database abstraction layer.
I figure that could be the query2 has disrupt the resource id of query1, there could be no way to fix it. But i need to know what cause this to happen so i could find a way to replace it while it still produce the same result i want.
thank you