Lines Matching refs:link
13 $link = NULL;
18 if (NULL !== ($tmp = @mysql_num_rows($link)))
23 function func_test_mysql_num_rows($link, $query, $expected, $offset, $test_free = false) {
25 if (!$res = mysql_query($query, $link)) {
26 printf("[%03d] [%d] %s\n", $offset, mysql_errno($link), mysql_error($link));
41 func_test_mysql_num_rows($link, "SELECT 1 AS a", 1, 5);
42 func_test_mysql_num_rows($link, "SHOW VARIABLES LIKE '%nixnutz%'", 0, 10);
43 func_test_mysql_num_rows($link, "INSERT INTO test(id, label) VALUES (100, 'z')", NULL, 15);
44 func_test_mysql_num_rows($link, "SELECT id FROM test LIMIT 2", 2, 20, true);
46 if ($res = mysql_query('SELECT COUNT(id) AS num FROM test', $link)) {
51 func_test_mysql_num_rows($link, "SELECT id, label FROM test", (int)$row['num'], 25);
54 printf("[030] [%d] %s\n", mysql_errno($link), mysql_error($link));
71 printf("[034] [%d] %s\n", mysql_errno($link), mysql_error($link));
74 mysql_close($link);