Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

query with multiple column values

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
goalsurfer
Smarty Rookie


Joined: 30 Oct 2009
Posts: 29
Location: Brussels

PostPosted: Mon May 02, 2011 6:04 pm    Post subject: query with multiple column values Reply with quote

Please, can someone give me the right syntaxis to use with sprinf in the following case? I used the ordinary expression "...WHERE columnname IN (value1, value2, value3) ORDER ..." in a query with sprintf but this doesn's work as it should Here is what I tried out, but isn't the right way:

Code:
$_query = sprintf("SELECT SQL_CALC_FOUND_ROWS * FROM tablename WHERE columnname IN (value1, value2, value3) ORDER BY name LIMIT %d,%d",
            SmartyPaginate::getCurrentIndex($no = 'default'), SmartyPaginate::getLimit());


Thanks.
(I can't find a solution in google neither in other discussions on this forum)
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP