|
#1
|
|||
|
|||
|
random_image.php causes error in mysql, and i don't know why
i'm having a problem getting the random_image.php file to work, and the result is when i mouseover on the link, i see showimage= with no randomly generated number on the end.
when i go to the admin section of pixelpost and load the addons, random_image.php is giving me the following error: Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /path/to/pixelpost/addons/random_image.php on line 59 (using v0.2, line 47 using 0.3) that row is the following: Code:
if (list($id,$headline,$image) = mysql_fetch_row($thumbs_ahead)) {
Code:
$thumbs_ahead = mysql_query("select DISTINCT id,headline,image from ".$pixelpost_db_prefix."pixelpost and datetime<='$cdate' order by rand() asc limit 0,$thmb_numb");
HOWEVER, in php, i then ran an echo command and tried to output the $thumbs_ahead variable, which resulted in nothing. (blank page, or when i put text there, just the text but not the variable) i used the same code in the index.php file as well (since it was referred to in the comments for random_image.php). it also doesn't seem to work. i really am at a loss here as to why this is occurring. here's my setup. does something look wrong here? PHP-version 4.3.11 (Pixelpost's min requirement: PHP version 4.3.0) MySQL version 3.23.58 (Pixelpost's min requirement: MySQL 3.23.58) GD-lib bundled (2.0.28 compatible) with JPEG support Server software Apache/2.0.52 (Fedora) EXIF Pixelpost is using exifer v1.5 for EXIF information. (i emailed this to raminia but it looks like he's busy... if he or anyone has any ideas, please enlighten me!!!!!) |
|
#2
|
|||
|
|||
|
hmm, nobody has a clue?
|
|
#3
|
|||
|
|||
|
ok this makes no sense to me. i modified a bit of code (new addons and the like) and now the random image actually works. i still get the mysql error when going into the addons page, but i'm not complaining because this thing works.
i'm confused, but i'm glad since it's finally functional! edit: i wanted to add that this only works with 0.2, not 0.3. |
|
#4
|
|||
|
|||
|
edit:
nevermind. FIXED IT. |
| Post Reply |
| Thread Tools | |
|
|