Lines Matching refs:link
15 function create_table($link, $column, $min, $max, $engine, $offset) {
17 if (!mysqli_query($link, 'DROP TABLE IF EXISTS test')) {
20 mysqli_errno($link), mysqli_error($link));
27 if (!mysqli_query($link, $sql)) {
30 mysqli_errno($link), mysqli_error($link));
40 if (!mysqli_query($link, $sql)) {
43 mysqli_errno($link), mysqli_error($link));
51 function test_format($link, $format, $from, $order_by, $expected, $offset) {
53 if (!$stmt = mysqli_stmt_init($link)) {
56 mysqli_errno($link), mysqli_error($link));
155 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
161 $expected = create_table($link, 'FLOAT', -10000, 10000, $engine, 90);
164 test_format($link, 'FORMAT(col1, 0)', 'test', NULL, array(), 100);
166 $expected = create_table($link, 'FLOAT', -10000, 10000, $engine, 110);
169 test_format($link, 'id AS order_by_col, FORMAT(col1, 0)', 'test', 'id', $expected, 120);
171 $expected = create_table($link, 'FLOAT UNSIGNED', 0, 10000, $engine, 130);
174 test_format($link, 'id AS order_by_col, FORMAT(col1, 0)', 'test', 'id', $expected, 140);
176 $expected = create_table($link, 'DECIMAL(5,0)', -1000, 1000, $engine, 150);
179 test_format($link, 'id AS order_by_col, FORMAT(col1, 0)', 'test', 'id', $expected, 160);
181 mysqli_close($link);