Re: Re:PHP 4.0 Bug #7752 Updated: Will not create a new table in database
| From: | Jani Taskinen | Date: | Sat, 11 Nov 2000 17:37:42 +0000 |
| Subject: | Re: Re:PHP 4.0 Bug #7752 Updated: Will not create a new table in database | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-37756@lists.php.net to get a copy of this message | ||
On 11 Nov 2000, matt grigajtis wrote:
>On 11 Nov 2000 02:28:40 -0000 Bug Database <php-dev@lists.php.net> wrote:
>>ID: 7752
>>Updated by: sniper
>>Reported By: mgrigajtis@rosasonline.com
>>Status: Closed
>>Bug Type: MySQL related
>>Assigned To:
>>Comments:
> Same with or without the semicolon. I had tried it both ways. As a
> test a wrote a line to create a new database and a new table inside of
> it. The database was created, the table was not.
Try the following script (change the database name and userid and
password first!):
<?php
$ds = mysql_pconnect("localhost", "user", "pass");
mysql_select_db("testdb",$ds);
$sql = "CREATE TABLE testtable (ID int(4), Date varchar(50), Sales float(4))";
$sr = mysql_query($sql);
echo "link: $ds result: $sr<br>";
?>
This works just fine for me. If this doesn't help you to get this
working, please ask further questions on php-general@lists.php.net or
php-db@lists.php.net. There is no bug in PHP regarding this.
--Jani