phpWebLog

find
story index | search | archive | submit story | downloads | stats | contact
Topics
  • General (894)
  • Announcements (20)
  • Development (516)
  • Mods & Hacks (28)


  • phpWebLog
  • Latest Release - 0.5.3 (BETA)
  • Latest Stable - 0.5.2
  • ChangeLog
  • TODO / Roadmap
  • BUGS

    CVS WEB

  • New XL fork 0.5.2
  • Unstable branch 0.5.3

  • For development discussions and for general support, join the phpWebLog mailing list

    phpWebLog needs active developers to help fix bugs. If you are interested, send me your SourceForge login information for CVS access.


    Last 5 Comments
  • IP blocking? (Jordi)
  • Chaging the Time Zone in phpWebLog (Beth)
  • Last 5 comments box (Chris DuBack)
  • Database has dissapeared (Calvin :))
  • Bug fix for header.inc (calvin)


  • Archive Bug and fix
    Posted under Development by John on Friday May 18 2001 @ 07:41AM EDT

    Development There's a small bug in the F_drawresults function from search.inc.php that causes the archive section of the site to not display the results when a specific month is selected.

    The bug occurs on lines 193 and 194 where the code reads:

    $sql .= "WHERE (month(Repostamp) = '$month' ";
    $sql .= "AND year(Repostamp) = '$year') ";

    The problem is that the single quotes around $month and $year will cause them to be placed literally into the $sql string, instead of their values, wrecking the query. To fix this, just replace the single quotes with an escaped double-quote:

    $sql .= "WHERE (month(Repostamp) = \"$month\" ";
    $sql .= "AND year(Repostamp) = \"$year\") ";

    -John




    < File extension | New Yaroon theme >

    Steen Brølling writes on Saturday May 19 2001 @ 12:40PM EDT: [ reply | parent ]
    Well that doesn't work here. I'm running the latest unstable, and the archive doesn't work at all.
    I just get a searchresult = nothing....
    Post a Comment
    Name:
    Email:
    URL:
      Remember my information (uses cookies)
      I would rather be anonymous
    Comment:
    * Your email will not be made public.
    Save As:

    SourceForge
    SourceForge is providing us a mailing list , documentation and a CVS tree.

    SourceForge Logo


    PHP.net
  • PHP 4.3.2RC2 Released
  • My PHP.net
  • International PHP Conference - Spring Edition Early Bird Discount runs out!
  • PHP 4.3.2RC1 Released
  • Grant Program
  • Set your own language preference
  • First Hungarian PHP Conference
  • PHP 4.3.1 released in response to CGI vulnerability
  • PHPCon East 2003 - (April 23-25, 2003)
  • LinuxTag, Karlsruhe, July 10th - 13th

  • PHPBuilder
  • Interfacing with COM objects under Windows
  • Dynamic XML Conversion Using the SAX Parser
  • Arrays 101
  • Introduction to PHP5
  • Installing PHP-GTK on Linux
  • Installing PHP under BadBlue Web Server
  • Installing PHP under Xitami
  • A Test To See If You Write Sloppy Software
  • Switchbox
  • Professional PHP4 Multimedia Programming


  • phpWebLog: A PHP News and Content Management System
    Copyright (C) 2000-2002, Jason Hines / Eye Integrated Communications