found_rows within stored procedure

calling the stored procedure:

result = $mysqli->query(“CALL getInventory2(@p_keywordParam,@p_pageOffset)”);
if(!$result) die(“CALL failed: (” . $mysqli->errno . ") " . $mysqli->error);

the stored procedure has a prepared statement and then executed:

@sql = […my sql code…]

prepare stmt from @sql;
execute stmt;
deallocate prepare stmt;

SELECT found_rows();

how then would you get the result set plus the number of rows back to php, i can access the result set, but not the number of rows which i need to setup pagination.

[php]$result->num_rows [/php]

Red :wink:

Sponsor our Newsletter | Privacy Policy | Terms of Service