Forum Moderators: coopster

Message Too Old, No Replies

deprecated function mysql_list_fields()

         

bomburmusicmallet

5:56 pm on Mar 23, 2006 (gmt 0)

10+ Year Member



Hi, I'm using PHP Version 5.0.3 where I work. The server was built over a year ago. I had originally written some functions that use the deprecated function mysql_list_fields() when we were using 4.x (I guess I didn't know it was deprecated when I wrote them). However, gave me no issues when we upgraded from 4.x to 5.0.3. Everything had been fine.

Just very recently, I have discovered that I cannot use mysql_list_fields() in new files. It works in files that I've had up on our server for ages, but I'm trying to use the same functions that use mysql_list_fields(), and I get an error when I try to use the result. However, I can use the same function in older files.

I have the code to replace the deprecated function, so I'm more wondering, is this normal? What does it mean when a function is deprecated? If I can run it on my server in an older file, why not in a newer file? I thought it would be removed from newer versions of PHP, and have nothing to do with what's on our server.

BTW, I checked with our Network Manager, and he hasn't touched the server since it was built.

If anyone can shed any light on this, I'd be so grateful! I reuse the same functions not only at work, but for many other sites I program. The thought of rewriting all my code is giving me nightmares!

Thanks.

coopster

7:38 pm on Mar 23, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Yes, the function is deprecated, but if it is working on the same server in other scripts than you have something wrong in this particular script. Are you certain your have a
resource link_identifier
open?

bomburmusicmallet

8:00 pm on Mar 23, 2006 (gmt 0)

10+ Year Member



Hi Coopster, I was just coming back to post a huge "NEVER MIND" because I found my error! The variable for my database name wasn't available in my pre-packaged scripts, and that's why it wasn't working! So it was just a coincidence.

Thank you! <embarassed grin />

coopster

9:12 pm on Mar 23, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



No worries, happens to us all (smiling).