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
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.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Tue May 21 03:01:31 2024 UTC