Annotation of embedaddon/php/ext/mysql/tests/table.inc, revision 1.1.1.1

1.1       misho       1: <?PHP
                      2: require_once 'connect.inc';
                      3: 
                      4: // connect + select_db
                      5: if (!$link = my_mysql_connect($host, $user, $passwd, $db, $port, $socket)) {
                      6:        printf("Cannot connect to the server using host=%s/%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                      7:          $host, $myhost, $user, $db, $port, $socket);
                      8:        exit(1);
                      9: }
                     10: 
                     11: if (!mysql_query('DROP TABLE IF EXISTS test', $link)) {
                     12:        printf("Failed to drop old test table: [%d] %s\n", mysql_errno($link), mysql_error($link));
                     13:        exit(1);
                     14: }
                     15: 
                     16: if (!mysql_query('CREATE TABLE test(id INT, label CHAR(1), PRIMARY KEY(id)) ENGINE=' . $engine, $link)) {
                     17:        printf("Failed to create test table: [%d] %s\n", mysql_errno($link), mysql_error($link));
                     18:        exit(1);
                     19: }
                     20: 
                     21: if (!mysql_query("INSERT INTO test(id, label) VALUES (1, 'a'), (2, 'b'), (3, 'c'), (4, 'd'), (5, 'e'), (6, 'f')", $link)) {
                     22:        printf("[%d] %s\n",  mysql_errno($link), mysql_error($link));
                     23: }
                     24: ?>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>