/hphp/test/slow/ext_mysql/mysql_fetch_assoc.php

http://github.com/facebook/hiphop-php · PHP · 13 lines · 11 code · 2 blank · 0 comment · 0 complexity · b5d89f3a55b4ba659010acbfdc0fca60 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('fetch_assoc'));
  6. var_dump(mysql_query(
  7. "insert into test_fetch_assoc (name) values ('test'),('test2')"));
  8. $res = mysql_query('select * from test_fetch_assoc');
  9. $row = mysql_fetch_assoc($res);
  10. print_r($row);
  11. }