Jump to content

Determining Field Names?


Balmung-San

Recommended Posts

I've never seen a problem that requires me to add tables dynamically, and I've seen a lot of problems. If you post some more details, we might be able to help you design something a little more stable.

However, you can always use SHOW commands to get whatever you need. SHOW DATABASES, SHOW TABLES, SHOW COLUMNS, etc.
Link to comment
https://forums.phpfreaks.com/topic/5077-determining-field-names/#findComment-18014
Share on other sites

I'm creating a shop system that will have different field names for each user. Each user will have a table that is equal to their username.

Could I do this?:

[code]
//connect and select_db
$sql = mysql_query("DESCRIBE ".$username);
$tables = mysql_fetch_array($sql);
[/code]
Link to comment
https://forums.phpfreaks.com/topic/5077-determining-field-names/#findComment-18347
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.