I don't think my databases like me connecting to them. You may remember the problems I had with the gateway scripts; well. I believe that it's the MySQL that is causing the problem. The fact that it won't connect.
What I needed was a MySQL script that had been writen by the best for the dumb people like me.
I found this is script:
<?php
/* Connecting, selecting database */
$link = mysql_connect("localhost", "zingbats", "my_pwl")
or die("Could not connect");
print "Connected successfully";
mysql_select_db("tycooneden_com") or die("Could not select database");
/* Performing SQL query */
$query = "SELECT * FROM clans WHERE clan_name = ("boballie")";
$result = mysql_query($query) or die("Query failed");
/* Printing results in HTML */
print "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
print "\t<tr>\n";
foreach ($line as $col_value) {
print "\t\t<td>$col_value</td>\n";
}
print "\t</tr>\n";
}
print "</table>\n";
/* Free resultset */
mysql_free_result($result);
/* Closing connection */
mysql_close($link);
?>
Gives the error:
Parse error: parse error, unexpected T_STRING in /usr/local/psa/home/vhosts/tycooneden.com/httpdocs/whatver.php on line 9
In ALL the other MySQL scripts I have tried, the error is ALWAYS in the query - Is it me or the MySQL database?