View Single Post
Old October 1st, 2012, 06:15 AM   #1 (permalink)
swtadm
Junior Member
Verified Customer
 
Join Date: Jun 2012
Posts: 11
Show Photo - mysql error displayed

Hi Chuck,

In one of my photopost installations, when a visitor goes to the Show Photo page a mysql error gets displayed at the top of the page.

The error is:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in [path]/photopost/forums/vb3.php on line 200

I debugged the vb3.php script and found that that it was not finding the table column, uf.field2 in the select statement on line 175. I looked at the userfields table and it holds my custom profile fields. When I set up the custom profile for this site, I must have deleted that field and my starting column is field5. I've changed the code for in the select statement to uf.field5 and it removed the error.

I decided to add a field2 to the db table and put the select statement back to it's original state. It doesn't mess up my custom profile so all is good.

This is just to let you know that this field can be deleted by users when creating a new, custom profile so it's probably worth considering how you want this select code to be written in the future!

Cheers,

Dennis
swtadm is offline   Reply With Quote