Errors with mysql

I’ve been tinkering with mysql, and I run an apache/mysql server from my computer, so I test my scripts there, and then I put them on my DH account. I was writing an address book script and it worked fine on my computer, but when I put it on DH, I got errors saying stuff like:

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in …addressbook/editrecord.php on line 18

The same thing happens for mysql_fetch_array() and mysql_fetch_object(). What could be the problem? Am I using an outdated function?