Re: CREATE TABLE QUERY PHP/MySQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 07 December 2002 05:00, Jonathan wrote:
> This is the first time I am trying to create a table in MySQL based on
> user input.
>
> Here is the scenario,
>
> The user will enter in the name of a stage, e.g. Harley Davidson.
> I then look for the first space (to indicate the first word), make it
> into lower case and then do the following:
>
> $new_stage_name = "stage_".$var;
>
> This will give $new_stage_name the value of "stage_harley".
>
> That works fine.
>
> Now I want to run the following query:
>
> $SQL = "CREATE TABLE ".$new_stage_name." (set values and their
> properties)";
>
> If I run this query using PHPMyAdmin, minus the var of course, the table
> is created.
>
> When I run it in my code, nothing happens. I do a die($SQL) to see the
> final outcome of the query and it's correct and is what I am using to
> run the query in PHPMyAdmin.

mysql_error() to see what the problem is.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
"...and the fully armed nuclear warheads, are, of course, merely a
courtesy detail."
*/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux