BOONEX.COM BOONEX BLOG BOONEX DEVZONE

Author Archive for interex

Sudden Database Error??

I’ve had an error just suddenly appear and I’m not understanding how it has arrived or how to fix it.

————————————–

Query:

   SELECT DISTINCT
   `ClassifiedsAdvertisements`.`ID`,
   `ClassifiedsAdvertisements`.`Subject`,
   `ClassifiedsAdvertisements`.`Media`,
   `Profiles`.`NickName`,
   UNIX_TIMESTAMP( `ClassifiedsAdvertisements`.`DateTime` ) as `DateTime_f`,
   `ClassifiedsAdvertisements`.`DateTime`,
   `Classifieds`.`Name`, `Classifieds`.`ID` AS `CatID`,
   `ClassifiedsSubs`.`NameSub`, `ClassifiedsSubs`.`ID` AS `SubCatID`,
   `ClassifiedsAdvertisements`.`Message`,
   COUNT(`ClsAdvComments`.`ID`) AS 'CommCount'
   FROM `ClassifiedsAdvertisements`
   LEFT JOIN `ClassifiedsSubs`
   ON `ClassifiedsSubs`.`ID`=`ClassifiedsAdvertisements`.`IDClassifiedsSubs`
   LEFT JOIN `Classifieds`
   ON `Classifieds`.`ID`=`ClassifiedsSubs`.`IDClassified`
   LEFT JOIN `Profiles` ON `Profiles`.`ID`=`ClassifiedsAdvertisements`.`IDProfile`
   LEFT JOIN `ClsAdvComments` ON
`ClsAdvComments`.`IDAdv`=`ClassifiedsAdvertisements`.`ID`
   WHERE
   `ClassifiedsAdvertisements`.`IDProfile`  =  AND
   `ClassifiedsAdvertisements`.`Status` = 'active'
   GROUP BY `ClassifiedsAdvertisements`.`ID`
   ORDER BY `DateTime` DESC
   LIMIT 5

Mysql error:
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 'AND
   `ClassifiedsAdvertisements`.`Status` = 'active'
   GROUP BY `Classified' at line 20

Found error in file member.php
at line 243. Called db_res function
with erroneous argument #0

Debug backtrace:
Array
(
    [1] => Array
        (
   [file] => member.php
   [line] => 243
   [function] => db_res
   [args] => Array
       (
  [0] =>
   SELECT DISTINCT
   `ClassifiedsAdvertisements`.`ID`,
   `ClassifiedsAdvertisements`.`Subject`,
   `ClassifiedsAdvertisements`.`Media`,
   `Profiles`.`NickName`,
   UNIX_TIMESTAMP( `ClassifiedsAdvertisements`.`DateTime` ) as `DateTime_f`,
   `ClassifiedsAdvertisements`.`DateTime`,
   `Classifieds`.`Name`, `Classifieds`.`ID` AS `CatID`,
   `ClassifiedsSubs`.`NameSub`, `ClassifiedsSubs`.`ID` AS `SubCatID`,
   `ClassifiedsAdvertisements`.`Message`,
   COUNT(`ClsAdvComments`.`ID`) AS 'CommCount'
   FROM `ClassifiedsAdvertisements`
   LEFT JOIN `ClassifiedsSubs`
   ON `ClassifiedsSubs`.`ID`=`ClassifiedsAdvertisements`.`IDClassifiedsSubs`
   LEFT JOIN `Classifieds`
   ON `Classifieds`.`ID`=`ClassifiedsSubs`.`IDClassified`
   LEFT JOIN `Profiles` ON `Profiles`.`ID`=`ClassifiedsAdvertisements`.`IDProfile`
   LEFT JOIN `ClsAdvComments` ON
`ClsAdvComments`.`IDAdv`=`ClassifiedsAdvertisements`.`ID`
   WHERE
   `ClassifiedsAdvertisements`.`IDProfile`  =  AND
   `ClassifiedsAdvertisements`.`Status` = 'active'
   GROUP BY `ClassifiedsAdvertisements`.`ID`
   ORDER BY `DateTime` DESC
   LIMIT 5

       )

        )

    [2] => Array
        (
   [file] => member.php
   [line] => 157
   [function] => PageCompClassifieds
   [args] => Array
       (
  [0] =>
  [1] =>
       )

        )

    [3] => Array
        (
   [file] => member.php
   [line] => 127
   [function] => getPageBlocks
   [args] => Array
       (
  [0] => 1
       )

        )

)

Admin Shoutbox Control addon.

This is an addon to be used in the Admin Panel.

The Shoutbox Control add on allows the admin to control what content is visable in the Shoutbox. If you have problems with users who put offensive content into your shoutbox or would like to have the ability to just delete comments easily then this addon is for you.

Takes a minute to set up and works great.

Get it here: http://www.expertzzz.com/Downloadz/view/1932

Homepage Display Issue??

Anyone have an idea where I can edit how many pics are displayed on the home page for “Profile Photos”  “Members”  and “Photo Gallery”  (on the homepage)…   It keeps displaying 8 images  (4 on top, 4 on bottom)  and I would like it to only show 4 total!!!

Any info would be great :)

Profile comments “Answer/Reply”

I would really like that when someone leaves a comment on my own profile that when i hit ‘answer’ it will post the reply on the persons profile that left it on mine.  like myspace, vampire freaks, etc..   I find it to be a little odd that it wasnt used in this manner to the begin with because now when someone comments me i hit answer it just reposts on my own profile and they wont know if i reply.

If anyone else has a solution to this or is interested in working up a patch/fix for this that would be great!  <3