Help with string
Posted: Thu Feb 23, 2012 11:45 am
Hi there,
I'm new in php coding so I need little help.
I need to find way to create table trough php code but with name of table from string. How to write that correct
here is example of my needs
$query ='CREATE TABLE $table_name (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT,
`vis_name` VARCHAR( 50 ) NOT NULL,
`vis_key` VARCHAR( 50 ) NOT NULL,
`date` DATETIME NOT NULL,
PRIMARY KEY ( `id` )
)';
Thank you in advance
I'm new in php coding so I need little help.
I need to find way to create table trough php code but with name of table from string. How to write that correct
here is example of my needs
$query ='CREATE TABLE $table_name (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT,
`vis_name` VARCHAR( 50 ) NOT NULL,
`vis_key` VARCHAR( 50 ) NOT NULL,
`date` DATETIME NOT NULL,
PRIMARY KEY ( `id` )
)';
Thank you in advance