Error creating database
Posted by: philipr (---.server.ntli.net)
Date: June 19, 2006 08:40PM

Hi

I'm new to databases and recieve this message when trying to create one in WAMP5

Error
SQL query:

CREATE DATABASE ;



MySQL said:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Can any one enlighten me, Tnanks

Options: ReplyQuote
Re: Error creating database
Posted by: tomfmason (---.ks.ok.cox.net)
Date: June 20, 2006 11:21PM

It is easier to do this from phpMyadmin but the code is as follows:

-
$sql = 'CREATE DATABASE `yourdatabase`'; 

Options: ReplyQuote
Re: Error creating database
Posted by: tomfmason (---.ks.ok.cox.net)
Date: June 20, 2006 11:23PM

That above was the php code and here is the sql code

CREATE DATABASE `yourdatabase`

or you can use the create database option on the main page of phpmyadmin

Options: ReplyQuote


Sorry, only registered users may post in this forum.