Nathann33 Posted June 27, 2006 Share Posted June 27, 2006 im working through the php tutorial on w3schools and im looking into the mysql tutorials. i used the code that they suggested to create a database called "my_db"next, i looked into creating a tablei tried using the code for creating a table just below the previous code. it returned "didnt work because this database has already been created"so i changed the name of the database to be created to "my_db2." this time, my_db2 was created right where i thought it would be, but its contents are the same as "my_db." is there any way to know if the table i created is there?thanks in advance Link to comment Share on other sites More sharing options...
justsomeguy Posted June 27, 2006 Share Posted June 27, 2006 The easiest way to manage your databases will be to use phpMyAdmin. It will give you a graphical interface of your databases and what they contain. Otherwise you will need to use a SQL query to get all of the table names, which I'm not sure of. You can probably find something like that through Google. Link to comment Share on other sites More sharing options...
scott100 Posted June 28, 2006 Share Posted June 28, 2006 im working through the php tutorial on w3schools and im looking into the mysql tutorials. i used the code that they suggested to create a database called "my_db"next, i looked into creating a tablei tried using the code for creating a table just below the previous code. it returned "didnt work because this database has already been created"so i changed the name of the database to be created to "my_db2." this time, my_db2 was created right where i thought it would be, but its contents are the same as "my_db." is there any way to know if the table i created is there?thanks in advance<{POST_SNAPBACK}> USE my_db To select the database SHOW tables To see all the tables in the db.Also to see info in the table, if it has any: SELECT * FROM tablename To see all the contents of the table name tablename Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now