Jump to content

djfox

Members
  • Posts

    327
  • Joined

  • Last visited

    Never

Everything posted by djfox

  1. I get the following errors: Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/secrett1/public_html/trances.php on line 23 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 & instead of loading any part of the file, the whole thing is blank after that. Here`s the coding, can anyone figure out what is wrong with it & know how to fix it: $lev=$_SESSION['level2']; $res = mysql_query("SELECT id, name, gallNum, URL, rating, numRates, description, views, cat, addDate, feature, literature FROM image WHERE id=$id"); if ($rows = mysql_fetch_row($res)) { return $rows; } else { print (mysql_error()); } if($submit){ $s = $sub." by ".$name; $b= emote($bod); mysql_query("INSERT INTO comment (imageID,subject,content,date,sender) VALUES ( '$id', '$s', '$b', NOW(),$send)")or die ( mysql_error()); mysql_query("INSERT INTO messagedata (recBoxID, sendBoxID, content, subject, isNew, date) VALUES ($rows[2], '7', 'You have a new comment on one of your trances that you have submitted. Click here to read the comment. This is automated message please do not reply.', 'New Comment Received', 1, NOW() )"); } if($policy && ($lev>6)){ mysql_query("UPDATE userdata SET violations=SUM(violations,1) WHERE login='$name'"); } $res = mysql_query("SELECT login FROM userdata WHERE id='$rows[2]'"); if ($by = mysql_fetch_row($res)) { return $by; } else { print (mysql_error()); } $res = mysql_query("SELECT icon FROM userdata WHERE id='$rows[2]'"); if ($icon = mysql_fetch_row($res)) { return $icon; } else { print (mysql_error()); } $res = mysql_query("SELECT name, id FROM imagecats WHERE id=$rows[8]"); if ($catName = mysql_fetch_row($res)) { return $catName; } else { print (mysql_error()); } $res = mysql_query("SELECT COUNT(*) FROM comment WHERE imageID='$id'"); if ($numCom = mysql_fetch_row($res)) { return $numCom; } else { print (mysql_error()); } $res = mysql_query("SELECT COUNT(*) FROM userdata WHERE imageFav='%$id%'"); if ($numFavs = mysql_fetch_row($res)) { return $numFavs; } else { print (mysql_error()); } //Update unique pageview counter if( !$_SESSION["sess_$id"] ){ $_SESSION["sess_$id"] = "visited"; $v = $rows[7] + 1; mysql_query("UPDATE image SET views=$v WHERE id='$id'"); }
  2. I have an art community being built on [a href=\"http://www.djfoxsfloatingisland.com\" target=\"_blank\"]http://www.djfoxsfloatingisland.com[/a] It has active members & lots of images. I used to have a programmer for it but he has left me with the project way unfinished. The thumbnail system he`s created takes a long time to load because instead of creating thumbnails, the system just takes the whole image & just shrinks it. I know no php knowledge. I can`t afford to hire another programmer so I have to do this myself. How can I fix the thumbnail system to function the way it`s supposed to?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.