I am looking to setup a database for my "test server"/offline access to collect data as I find it so it will be easier to compile the data to put the info online in a more accurate fasion.
I have a basic jist of how to do the database, but I do have a few questions.
Qustion 1) I know for displaying row information you use $row['row_name'], would $table['table_name'] work the same way? Essentially what I am tryinging to do is build the database so that I can output the information in a tabular format...
For instance:
Code:
<!doctype html public "-//W3C//DTD HTML 4.01 transitional//EN">
<html>
<head>
<title>Ctechinfo - Motherboard Database</title>
<meta name="description" content='Ctechinfo - Your unofficial #1 Compaq/HP resource website. The largest database of Compaq/HP motherboard information on the internet.'/>
<meta http-equiv="content-type" content="text/html; charset="utf-8">
<meta name="keywords" content='Compaq, HP, Hewlett-Packard, motherboard information, Asus, BCM/GVC, BIOSTAR, Chaintech, ECS, Elite Group, FIC, First International Computer, Foxconn, Gigabyte, Intel, LiteOn, Mitac, MSI, Microstar International, Privas, Quanta, Tatung, Tekram, TPV-Inventa, Trigem'>
<meta name="author" content="Toby Bibeau">
<meta name="robots" content="noindex,nofollow">
</head>
<body bgcolor="#ffffff" margin="5px" font-size="14px" font-family="verdana">
<?php
//Connect to the server and select database; you may need it
$dbc = mysqli_connect('localhost', 'root', '5GH9A4X1', 'boards')
or die("Could not connect to the database.");
$query = "SELECT * FROM `asus` ORDER BY `real_name` ASC LIMIT 0, 30 ";
$data = mysqli_query($dbc, $query);
while ($row = mysqli_fetch_array($data)) {
//Show results table
print '<table><tr><th colspan='."6".'><center>'.$table['asus'].'</center></th></tr>
<tr><td>' . $row['real_name'] . '</td><td>'.$row['ver'].'</td><td>'.$row['code_name'].'</td></tr>'.$row['part_number'].'</td></tr>'.$row['spare'].'</td><td>'.$row['colors'].'</td></tr></table>';
}
mysqli_close($dbc);
?>
</body>
</html>
The table name is fluid I have 16 folders to work from and want the code to self adjust (for the table name) per folder (1 html table per folder). The Row Names will but output'ted code via a normal echo, but the row data will be set. btw the above produces a blank page.. and php.ini has "errors on"
Question 2) When entering data. How could I mesh the data together for instance on one day I find a code name and a spare part number for a particular board, then two weeks later I find a real name or a retail part number.
Would also like to build an html data entry page instead of using the phpMyAdmin interface..