开发者

create table like new table individually numbered

I'm new to all of this but decided to create an online system for our company but now stuck!

What I'm trying to do is copy a mysql table but each table 开发者_Python百科have a unique number when ever the script is ran i.e. autoquoteS1, autoquoteS2 etc.

I've searched a lot for this and this is the best I can find.

mysql_select_db("sdbdb", $con);
$sql = "CREATE TABLE IF NOT EXISTS autoquoteS1 LIKE autoquoteS";

Any help is very much appreciated


this sounds like a problem.

you should not be creating many many copies of the same table, instead, you should be entering many many rows into a single table. (assuming the same structure)

maybe you can post your table design, and we can help you with normalization.

edit:

you may be looking for something like this:

quote
--------
quote_id
customer_id
total
status

quote_line_item
----------------
quote_id
line_num
quantity
amount
item_id

item
--------
item_id
description
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜