SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2005
    Posts
    52
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Search query skips xx/08 & xx/09 data

    Hello All,

    I have a simple query running from which I display on my page expiring coupons in ASC order,

    $get_cats = "SELECT item_id, item_title, item_desc, item_subdesc, store_image, item_image, item_code, item_exp, dept_id FROM `store_item` WHERE `item_exp` LIKE '200%,%,%' ORDER BY `item_exp` ASC LIMIT 0, 25";

    You can view the display page at

    http://www.indian-town.com/coupon/st...s/expiring.php

    What I am facing problems is that the query does not displays the data for ex, 2005,05,08 & 2005,05,09 and as a matter of fact any data for the days xx/08 & xx/09.

    When I change the query for ORDER BY 'item_id' then the search result included the 05,08 & 09 data.

    I am lost.

    Please help me with suggestions where I am missing.

  2. #2
    SitePoint Enthusiast michelangelo's Avatar
    Join Date
    May 2005
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sounds bizzare. Can't debug without the raw data though. Maybe there are hidden characters in there you don't know about - try viewing the rows via phpMyAdmin.

    The page you've posted looks ok to me

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2005
    Posts
    52
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Enclosed is the raw data

    Thanks for the reply......... I am enclsoing few raw data examples,

    1. When I do a search with item_id all the data shows....... with xx/08 & xx/09

    SQL-query:
    SELECT *
    FROM `store_item`
    WHERE `item_exp` LIKE '200%,%,%'
    ORDER BY `item_id` ASC
    LIMIT 0 , 30

    Result
    item_id item_title item_price item_desc item_subdesc item_code item_exp unknown_exp item_image dept_id merchant_id deal_coupon coupon_id sort_id store_image time_stamp

    1031 Mother's Day Jewelry Sale NULL <a target="_blank" href="http://click.linksynergy... NULL None 2005,5,8 NULL http://www.limogesjewelry.com/linkshare/mothersday... 53 NULL deal NULL jewelry limogesjewelry.gif 20050429222831

    But when I do a query with item_exp... the data don't show and skip xx/08 & xx/09

    SQL-query:
    SELECT *
    FROM `store_item`
    WHERE `item_exp` LIKE '200%,%,%'
    ORDER BY `item_exp` ASC
    LIMIT 0 , 30

    Result

    2633 Free Shipping at Flowerstore.com NULL <a
    href="http://click.linksynergy.com/fs-bin/cli... NULL None 2005,05,10 NULL http://www.giftbaskets.com/GiftBaskets/Banners/FS_... 270 NULL deal NULL gifts flowerstore.gif 20050405170534

    Appreciate if someone can also give a look and let me know how to solve the mystery.

    Thanks in advance.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •