uw Thu Jul 12 16:03:10 2007 UTC Modified files: /php-src/ext/mysql/tests mysql_query.phpt Log: Testing SELECT "a" AS "". This is nice to test strcmp() and similar... http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_query.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/mysql/tests/mysql_query.phpt diff -u php-src/ext/mysql/tests/mysql_query.phpt:1.2 php-src/ext/mysql/tests/mysql_query.phpt:1.3 --- php-src/ext/mysql/tests/mysql_query.phpt:1.2 Thu Jul 12 10:47:00 2007 +++ php-src/ext/mysql/tests/mysql_query.phpt Thu Jul 12 16:03:10 2007 @@ -35,6 +35,13 @@ var_dump(mysql_fetch_assoc($res)); mysql_free_result($res); +if (!$res = mysql_query('SELECT "a" AS ""', $link)) + printf("[007a] [%d] %s\n", mysql_errno($link), mysql_error($link)); + +var_dump($tmp = mysql_fetch_assoc($res)); +var_dump($tmp[""]); +mysql_free_result($res); + if (false !== ($res = mysql_query('SELECT "this is sql but with semicolon" AS valid ; SHOW VARIABLES', $link))) printf("[008] [%d] %s\n", mysql_errno($link), mysql_error($link)); @@ -87,6 +94,11 @@ ["valid"]=> string(30) "this is sql but with semicolon" } +array(1) { + [""]=> + string(1) "a" +} +string(1) "a" Warning: mysql_query(): %d is not a valid MySQL-Link resource in %s on line %d done! @@ -95,6 +107,11 @@ [u"valid"]=> unicode(30) "this is sql but with semicolon" } +array(1) { + [u""]=> + unicode(1) "a" +} +unicode(1) "a" Warning: mysql_query(): %d is not a valid MySQL-Link resource in %s on line %d -done! \ No newline at end of file +done!
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php