php - probably wood for trees - mysql won't return fulldataset -


i run following php , first record in table , that's it, array containing 1 element.

$sql = 'select id users';   $pass = mysql_query($sql);   var_dump($pass);    $row = mysql_fetch_assoc($pass);   var_dump($row);   

but exact same sql fed straight database gives me full dataset, on 300 records. flip doing wrong php?

thanks :)

you have loop through each row:

$sql = 'select id users';   $pass = mysql_query($sql);    while( $row = mysql_fetch_assoc($pass) ) {     var_dump($row);  } 

Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -