php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7752 Will not create a new table in database
Submitted: 2000-11-10 14:09 UTC Modified: 2000-11-10 21:28 UTC
From: mgrigajtis at rosasonline dot com Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.0.2 OS: Linux Mandrake 7.2 Kernel 2.2.17
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mgrigajtis at rosasonline dot com
New email:
PHP Version: OS:

 

 [2000-11-10 14:09 UTC] mgrigajtis at rosasonline dot com
     PHP4 will not ever create a new table in any database.  It will create a new database, but just simply will not create the table.  
     For example, the following lines do not work:

     $query = "CREATE TABLE $name (ID int(4), Date varchar(50), Sales float(4));"
     $result = mysql_query ($query);

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-10 21:28 UTC] sniper@php.net
Your script is buggy, below correct line: 

$query = "CREATE TABLE $name (ID int(4), Date varchar(50), Sales float(4))";

You had ; before " as it should be after..typo?
And do not add ; to mysql query strings in PHP.

--Jani

 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Oct 11 06:00:01 2026 UTC