So I have this mysql database on my homeserver.
I have to start developing the php-website which uses this database.
No comments or documentation .. really messed up.
Any tips on how to get started ?
Anything on how to understand the database structure ? Something to make it graphical or .. (just guessing now)
Anything really..
You can use phpMyAdmin for database management. It is a web-based database administration tool and is really easy to use. As for getting to know MySQL, I suggest picking up a book and reading tutorials on the web. I've got MySQL 5.0 Certification Study Guide which isn't a bad book at all (although a bit boring).
To start with, do you know SQL? That's that first place you have to go. If you're looking for a graphical interface, that suggests to me that you don't know how to interact with a database other than Access (which is junk).
No book comes close to good old fashion practice imo!![]()
I agree but you must first learn how to practice.
ok
so the following I have some knowledge of: SQL, phpMyadmin and PHP
My actual problem is that the database is huge(a few dozen tables)
Since I wanna learn how the db is built, I thought there propably is a better way then just go though every table and make the connections as I go .. huge job
I would start with a list of tables and fields. Once that is done, you can look at sample data to get an idea of how everything hooks together. Usually field/table names will be a big clue.
List all the tables, in that query for each table query and get 1 row from there and print it out and see the design or something
Code:<?PHP
//CONNECT HERE!!
$query = mysql_query("SHOW TABLES");
while($row=mysql_fetch_assoc($query)) {
$one = array_pop($row);
$q = mysql_query("SELECT * FROM `$one` LIMIT 1") or die (mysql_error());
while($r=mysql_fetch_assoc($q)) {
$s .= "<hr>".$one."<br />";
$s .=print_r($r, true);
}
}
?>
<pre><?=$s?></pre>
MySQL makes it easy to get info about the database from the console.
MySQL :: MySQL 5.0 Reference Manual :: 12.5.5.34 SHOW TABLES Syntax
MySQL :: MySQL 5.0 Reference Manual :: 12.5.5.5 SHOW COLUMNS Syntax
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks