I just picked up some MySQL stuff yesterday, and I am trying to create a database for image pointers. I have that ok so far. My problems is when I display the vaules of what I want. it displays all the colums, and I only want it to display the colum "Location"
Here is the code I am using:
<?php
/* Connecting, selecting database */
$link = mysql_connect("**", "**", "**")
or die("Could not connect : " . mysql_error());
echo "Connected successfully";
echo "<br>";
/* Performing SQL query */
$query = "SELECT * FROM table1 schools where Type LIKE 'Hardscape'";
$result = mysql_query($query) or die("Query failed : " . mysql_error());
echo "<br>";
/* Printing results in HTML */
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "\t<tr>\n";
foreach ($line as $col_value) {
echo "\t\t<td>$col_value</td>\n";
}
echo "\t</tr>\n";
}
echo "</table>\n";
/* Closing connection */
mysql_close($link);
?>
Can anyone help me with how to display only certian colums?