|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13198 mysql_query does not understand result resource from "CREATE TABLE" query
Submitted: 2001-09-07 13:08 UTC Modified: 2001-09-07 14:29 UTC
From: matthew at ectisp dot net Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.0.6 OS: Linux 2.4.9
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: matthew at ectisp dot net
New email:
PHP Version: OS:


 [2001-09-07 13:08 UTC] matthew at ectisp dot net
Basically this code will return this error:
Warning: Supplied argument is not a valid MySQL result resource in /var/lib/apache/htdocs/mailtest/ 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);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-07 13:09 UTC] matthew at ectisp dot net
oh, and here's the function from my db_tool class:

 function db_query($query) {
                return mysql_query($query);
 [2001-09-07 14:29 UTC]
Not a bug. CREATE TABLE doesn't return a result-set. Check for errors with mysql_error() and mysql_errno().
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Apr 01 07:03:36 2023 UTC