Click to See Complete Forum and Search --> : MySQL doesn't like me


Wedvich
02-26-2005, 08:34 AM
I was running a development environment using Apache 2, PHP 4.3.10 and MySQL 4.1.9, and I could do this:

$sql = 'SELECT config_value FROM cd_config WHERE config_name = \\'style\\'';
$style = mysql_result(mysql_query($sql), 0);

(note that there are \ slashes before the quotes around the "style" value, but the bbcode here strips them)

Then I did a mistake and deleted some files that MySQL needed, and I had to reinstall MySQL, albeit now version 4.1.9 was replaced with 4.1.10. Whatever, I thought, and I went ahead and installed it. However, when I now tried to run the same piece of code I showed above, I got the following error:

Warning: mysql_result(): supplied argument is not a valid MySQL result resource in C:\Apache2\htdocs\index.php on line 12

Whatever I try I just can't get the mysql_result function to work. Does anyone know what I can do?

LiLcRaZyFuZzY
02-26-2005, 08:44 AM
maybe you can try to reinstall 4.1.9
http://downloads.mysql.com/archives.php?p=mysql-4.1&v=4.1.9

LiLcRaZyFuZzY
02-26-2005, 08:45 AM
and im sure MySQL likes you a lot!

Wedvich
02-26-2005, 08:53 AM
and im sure MySQL likes you a lot!

... Or so I'd like to believe, but I'm not so sure :rolleyes:

Anyway, thanks for the link. I'll roll back to .9 again.





Damnations upon thee, thy filthy MySQL .10 beast!

*runs away*

LiLcRaZyFuZzY
02-26-2005, 08:56 AM
hehehe