Emer...gen...cy?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Mightywayne
Forum Contributor
Posts: 237
Joined: Sat Dec 09, 2006 6:46 am

Emer...gen...cy?

Post by Mightywayne »

Uhm hello. Very odd happening here.

Randomly, out of nowhere, my mysql_fetch_arrays do not work.

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in

But uhm, there's nothing wrong with them. Like these have been looking fine and working correctly for about 2 months, and out of nowhere they don't work anymore?

I'm wondering, maybe, is anyone else having this problem? Likely not, so... I'm on a shared server. Do you think there's a command in their depths of PHP file that is stopping the fetching from working? They might be upgrading PHP or something.

It's only fetching, I can see so far. This is terrible because I'm on a deadline I'd like to meet.
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Post by daedalus__ »

Mightywayne wrote:I'd just like to say that before each question I ask, I research it in Google, to save me and you time.
That error may indicate that the query failed. You should put some error checking around your query and sniff it out.
Mightywayne
Forum Contributor
Posts: 237
Joined: Sat Dec 09, 2006 6:46 am

Post by Mightywayne »

Cute... I checked a few places to see if maybe PHP was having a global problem or not.

Something did come up, and it shouldn't be acting like this. Give me a second.

And, thank you, for your help.

Edit: How embarrassing. It was actually a combination of two stupid mistakes at once. Suits me for working on two scripts at once.

Sorry for wasting your time, if there is a kind mod out there, you can close/delete this embarrassing topic.
Last edited by Mightywayne on Wed Mar 28, 2007 7:38 pm, edited 1 time in total.
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Post by daedalus__ »

If you can post your code I will give you suggestions.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Almost 100% of the time, the not a valid result resource means that your query is jacked up, not that the function is broken. And no, the mods are not going to delete this thread. Though posting your fix would be nice.
Post Reply