how to create table in mysql using php variable

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
vidyabhushan
Forum Newbie
Posts: 16
Joined: Mon Oct 20, 2008 4:58 pm

how to create table in mysql using php variable

Post by vidyabhushan »

what is the mistake in creating table in mysql using php... please somebody help me...

$qry = "create table"`.$Test_id.`"(question_no int)";
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: how to create table in mysql using php variable

Post by jayshields »

Code: Select all

$qry = "create table `".$Test_id."`(question_no int)";
vidyabhushan
Forum Newbie
Posts: 16
Joined: Mon Oct 20, 2008 4:58 pm

Re: how to create table in mysql using php variable

Post by vidyabhushan »

ya i got it... thank buddy.... thank you very much....
vidyabhushan
Forum Newbie
Posts: 16
Joined: Mon Oct 20, 2008 4:58 pm

Re: how to create table in mysql using php variable

Post by vidyabhushan »

what about this??? this one is not working..

$qry1 = "delete from table `".$Test_id."`";
Post Reply