ianwattb -
Joined: 29 Sep 2003 Posts: 14
|
Posted: Tue Sep 30, 2003 6:47 pm Post subject: Help Please with mysql |
|
|
hiya, am new to the hole mysql but am writing a very basic mysql page at the minute. My problem is for some reason i get this back from my server
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in C:\ABYSS\htdocs\test.php on line 8
Site Name:
below is my hole script code but i cant figure out what is the problem and as far as i know the code is right.
<html>
<body>
<?php
$db = mysql_connect("127.0.0.1", "root");
mysql_select_db("enduser",$db);
$result = mysql_query("SELECT * FROM site information",$db);
printf("Site Name: %s<br>\n", mysql_result($result,0,"Site Name"));
printf("Site Address: %s<br>\n", mysql_result($result,0,"Site's Address"));
printf("Category: %s<br>\n", mysql_result($result,0,"Category"));
?>
</body>
</html>
Anyone who can help me it would be most grateful. Thanks <>< |
|