Bug #13198 Updated: mysql_query does not understand result resource from "CREATE TABLE" query
| From: | matthew at ectisp dot net | Date: | Fri, 07 Sep 2001 17:09:52 +0000 |
| Subject: | Bug #13198 Updated: mysql_query does not understand result resource from "CREATE TABLE" query | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-65375@lists.php.net to get a copy of this message | ||
ID: 13198
User updated by: matthew@ectisp.net
Reported By: matthew@ectisp.net
Status: Open
Bug Type: MySQL related
Operating System: Linux 2.4.9
PHP Version: 4.0.6
New Comment:
oh, and here's the function from my db_tool class:
function db_query($query) {
return mysql_query($query);
}
Previous Comments:
------------------------------------------------------------------------
[2001-09-07 13:08:03] matthew@ectisp.net
Basically this code will return this error:
Warning: Supplied argument is not a valid MySQL result resource in
/var/lib/apache/htdocs/mailtest/class.db_tool.inc.php on line 35
$tblname = "mail_" . $user_id;
$query = "CREATE TABLE $tblname (id int(11) NOT NULL auto_increment, folder varchar(255)
default NULL, user_id int(11) default NULL, uidl varchar(255) NOT NULL default '', tos
text, froms text, subject text, is_mime tinyint(1) default NULL, was_read tinyint(1) default NULL,
acc_id int(11) default NULL, mail longtext, date varchar(14) default NULL, priority tinyint(4)
default '0', from_name text, PRIMARY key (id), KEY uidl(uidl))";
$res = $this->db_tool->db_query($query);
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=13198&edit=1