found out that when a bulk of codes comes between a mysql query and the mysql_fetch_array function, the result of the mysql_query statement dispappears ...as in something like below:
is there any way to keep $result alive no matter the distance between its declaration and use? or are my obsevations wrong?
Code:
//db connection
$result = mysql_query($sql_statement);
//some long lines of codes, statements, loops, etc
//...that just must come in here
//eg,using mysql_num_rows to do some stunts
while(list($columnA, $columnB) = mysql_fetch_array($result)){
//this wont just work
//unless i requery the $sql_statement
//...immediately b4 the while loop
//i.e adding ds: $result = mysql_query($sql_statement);
}