Download src/php/php-src/ext/mysqli/tests/063.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 831 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/mysqli/tests/063.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/mysqli/tests/063.phpt
-
curl -L -o 063.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/mysqli/tests/063.phpt
831 Bytes
| --TEST-- | |
| resultset constructor | |
| --EXTENSIONS-- | |
| mysqli | |
| --SKIPIF-- | |
| require_once 'skipifconnectfailure.inc'; | |
| --FILE-- | |
| require_once 'connect.inc'; | |
| $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); | |
| $stmt = new mysqli_stmt($mysql, "SELECT 'foo' FROM DUAL"); | |
| $stmt->execute(); | |
| $stmt->bind_result($foo); | |
| $stmt->fetch(); | |
| $stmt->close(); | |
| var_dump($foo); | |
| mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); | |
| try { | |
| // an exception should be thrown from prepare (i.e. constructor) not from execute | |
| $stmt = new mysqli_stmt($mysql, "SELECT invalid FROM DUAL"); | |
| } catch(mysqli_sql_exception $e) { | |
| echo $e->getMessage()."\n"; | |
| } | |
| $mysql->close(); | |
| --EXPECTF-- | |
| string(3) "foo" | |
| Unknown column 'invalid' in '%r(SELECT|field list)%r' | |