/hphp/test/slow/ext_mysql/mysql_query.php

http://github.com/facebook/hiphop-php · PHP · 18 lines · 15 code · 3 blank · 0 comment · 0 complexity · db88c4e9748c76be41a4938a525083ba MD5 · raw file

  1. <?hh
  2. require_once('connect.inc');
  3. <<__EntryPoint>> function main(): void {
  4. $conn = mysql_connect($host, $user, $passwd);
  5. var_dump(create_test_table('query'));
  6. var_dump(mysql_query(
  7. "insert into test_query (name) values ('test'),('test2')"));
  8. $res = mysql_query('select * from test_query');
  9. $row = mysql_fetch_assoc($res);
  10. print_r($row);
  11. $row = mysql_fetch_assoc($res);
  12. print_r($row);
  13. $row = mysql_fetch_assoc($res);
  14. var_dump($row);
  15. }