Ignore:
Timestamp:
Nov 25, 2009, 8:02:57 PM (14 years ago)
Author:
nikrou
Message:

Feature 1255: modification in sql queries

  • manage random function
  • manage regex syntax
  • manage quote (single instead of double)
  • manage interval
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/category_cats.inc.php

    r4334 r4367  
    3636  FROM '.CATEGORIES_TABLE.' c INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.'
    3737  ON id = cat_id and user_id = '.$user['id'].'
    38   WHERE date_last >= SUBDATE(
    39     CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY
    40   )
     38  WHERE date_last >= '.pwg_db_get_recent_period_expression($user['recent_period']).'
    4139'.get_sql_condition_FandF
    4240  (
     
    105103      "\n  AND"
    106104    ).'
    107   ORDER BY RAND()
     105  ORDER BY '.DB_RANDOM_FUNCTION.'()
    108106  LIMIT 1
    109107;';
     
    133131      "\n  AND"
    134132    ).'
    135     ORDER BY RAND()
     133    ORDER BY '.DB_RANDOM_FUNCTION.'()
    136134    LIMIT 1
    137135  ;';
Note: See TracChangeset for help on using the changeset viewer.