PDA

View Full Version : MySQL Error...!!


Smoky
11-11-2004, 07:24 PM
:( Hey... Iv just started using MySQL, so i need some help with these error messages is sends up..!

Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/smoky/public_html/index.php on line 10

<?php
@mysql_pconnect("localhost","smoky","***")
* * * * * or die(" Could not connect to local host..!");
@mysql_select_db("smoky_LocalDB")
* * * * * or die(" Could not select database..!");
$query = "INSERT INTO USER_DATA name='Mark Wallsgrove', password='5d41402abc4b2a76b9719d911017c592', email='mark@fightinglimits.co.uk',
* * * * * Expirary='999999', user='smoky'";
$results = mysql_query($query);
$answers = mysql_result($results, 0, "user");
echo($answers);
mysql_close();
?>

Any help would be great...!
Cheers
EDIT:
arrrrr..... you guys are to slow!

I missed the insert into user_data set bla bla bla

Cheers any ways

Smoky
11-11-2004, 07:42 PM
Actually just realised that i caught a different error not the one i wanted :angry:

But still please help...!!

Error:
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/smoky/public_html/index.php on line 9 :unsure:

If its any help if does write the information into the database.!

mahangee
11-11-2004, 09:09 PM
Is it the query posted in your first post? That is bringinf up the error.

Smoky
11-11-2004, 09:25 PM
No it isnt... it seams to be this line

$answers = mysql_result($results, 0, "user");

any ideas? :(

mahangee
11-11-2004, 09:26 PM
If may not be post the whole thing so we can have a look. :D How are we meant to help if we cant see the error? Use your noodle. Lol.