SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot dizyn's Avatar
    Join Date
    Apr 2006
    Posts
    181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PROCEDURE Problem

    I am having problem with limit variable in PROCEDURE:
    If i try following code i get error, in this code I am passing lmting variable as start limit of the results and its giving me error. If i don't pass the variable it works fine without any problem.

    Here is my current procedure:
    Code:
    CREATE PROCEDURE `zselectClassifieds`(IN catid INTEGER(11), IN lmting INTEGER(11))
    select zclassifieds.price,zclassifieds.title, zclassifieds.PK_ID, date_format(zclassifieds.created, '%d-%b') as created,
         user.login_id, zclassifieds.location
         from 
         zclassifieds, user 
         where 
         zclassifieds.FK_ZCATEGORY_ID = catid and 
         user.PK_ID = zclassifieds.FK_USER_ID and 
         zclassifieds.expiry > now()    
         order by zclassifieds.PK_ID desc
         LIMIT lmting , 30 ;
    Last edited by longneck; Apr 8, 2008 at 11:39. Reason: fixed code tag

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    can you post the error?
    Check out our new Industry News forum!
    Keep up-to-date with the latest SP news in the Community Crier

    I edit the SitePoint Podcast


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
  •