Help Please with mysql

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
ianwattb
-


Joined: 29 Sep 2003
Posts: 14

PostPosted: Tue Sep 30, 2003 6:47 pm    Post subject: Help Please with mysql Reply with quote

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 <><
Back to top View user's profile Send private message
ianwattb
-


Joined: 29 Sep 2003
Posts: 14

PostPosted: Tue Sep 30, 2003 7:46 pm    Post subject: Got it working Reply with quote

i got it to work turns out i forgot to put a space between "end user" which is the database name and the hole fing wudnt work cause of it. Stupid mistake on my side. Thanks for the help.
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group