Example 1 — Buffer a Result After real_query
Demo flow with fixed row-count output.
<?php
echo 'mysqli_real_query($link, 'SELECT id, name FROM users')', PHP_EOL;
echo 'result = mysqli_store_result($link)', PHP_EOL;
echo 'num_rows = 2', PHP_EOL; How It Works
- Send SQL with real_query (or handle multi_query results).
- store_result() pulls the full set to the client.
- num_rows and data_seek work on buffered results.
- Sample output when connected to a demo database shows the real row count.

