The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
MySql Ver 5.1.31 Syntax Error
Hello!
I'm getting the following error: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in [path]/pp-classifieds/inc_ads.php on line 69 Line 69 reads: while ( list( $catugid, $ugnoview ) = mysql_fetch_row($resultb) ) Syntax checker states the problem is in this first line, and has something to do with the use of while. Anybody here familiar with this? Thanks! |
#2
|
|||
|
|||
This error usually indicates that the result of the query is invalid. This can happen when the required database/table structure is incomplete/missing or the database connection could not be made.
|
#3
|
||||
|
||||
The error tells you the problem. $resultb is not a valid result resource.
In otherwords, whatever is supposed to create it [in the code before it] failed, so its likely null or false. |
#4
|
|||
|
|||
This is the code snipit that is giving me a problem. I used a couple online mysql checkers on this and both indicated a problem in the red text line. The script was written for php3x and my server has 5.1.13. The error has to do with the use of "while", so I'm trying to apply the correct syntax, but really don't know what that would be. I've looked online and have seen similar issues with example fixes, but I'm not sure how to apply them or if they'd even work...
$ViewPerm = array(); while ( list( $catugid, $ugnoview ) = mysql_fetch_row($resultb) ) { $noview=0; $ViewPerm[$catugid] = 1; $allnoview = explode( ",", $ugnoview ); foreach ($allnoview as $key) { if (in_array($key, $grouparr) ) { $noview = 1; } } if ( $noview == 0 ) { $ViewPerm[$catugid]=0; } } } Any thoughts on this would be appreciated. For added info, this snipit comes from the inc_ads.php file in Photopost Classifieds v4.1. Thanks |
#5
|
||||
|
||||
That doesnt help at all, there isnt anything wrong with the line.
As I said before, the problem is $resultb, which should be a valid mysql result set, but isnt, so as I mentioned, the problem is with whatever creates that $resultb in the preceeding code. Most likely as Dave said, the mysql connection or query is failing, so no result set is being generated. |
#6
|
|||
|
|||
Thanks for the reply Mike, and actually I'm looking into a possible problem with the db connection. The classifieds were actually working just fine except one issue I was having with one of 6 data subdirectories. I decided to uninstall. On reinstall, several php errors were generated and I fixed all except this file. The required file identified in the script is required by multiple php files and all the others work, so what you suggest does make sense to me. I will first resolve an issue with the db tables regarding this application, then return to tackle this one. I don't want you to think I blew off the above comments, I'm just trying to rule out other possibilities as I work through this. I appreciate the input. Thanks!
Now, anybody know of a good gallery app? I'm using photopost vbGallery but it has a few shortcomings. Thanks. |
#8
|
|||
|
|||
My bad, I was in a forum on another site just before I came back here. Must be oldtimerz. This problem was resolved. Going through my error logs there were multiple errors in the classifieds. Looked like issues that resulted from a bad install of the app. Though the classifieds were functioning well enough to post ads, there were background issues. I dropped the tables, removed the directory and reinstalled. Played with the classifieds, fixed a couple errors viewed in the log then backed it up. Running without errors now. Based on the info received by you (Paul ) and Dave, I figured data was being called from a table(s) that may have been corrupted. The classifieds had been running well for a few years and the syntax was checked against the newer php ver. on my server. Anyway, thanks for the input!
Now, anybody know of a good gallery? Using photopost vbgallery and it has a few shortcomings. |
Благодарность от: | ||
MarkFL |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|