List Info

Thread: Create MYSQL Table using $username as table name




Create MYSQL Table using $username as table name
user name
2006-12-14 13:17:14
why do you have to use $username.i guess username would be
ok.

On Nov 24, 7:16 pm, "Flickle"
<daniellee2...hotmail.co.uk> wrote:
> Hello I trying to create simple tables using the
$username as the table
> name
> how do i do this does anyone know?
>
> heres whats ive tried but it doesnt work
>
> mysql_select_db("my_db", $conn);
> $sql = "CREATE TABLE `$username` (
> `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
> `images` VARCHAR( 255 ) NOT NULL ,
> `imagespath` VARCHAR( 255 ) NOT NULL ,
> ) ENGINE = MYISAM";
> mysql_query($sql,$conn);
> 
> thanks in advance


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the
Google Groups "PHP & MySQL" group.
To post to this group, send email to phpmysqlgooglegroups.com
To unsubscribe from this group, send email to
phpmysql-unsubscribegooglegroups.com
For more options, visit this group at ht
tp://groups-beta.google.com/group/phpmysql?hl=en
-~----------~----~----~----~------~----~------~--~---

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )