Posted By

tclancy on 03/10/09


Tagged

ExpressionEngine


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

nirva
oxygensmith
digitalink


Expression Engine Dynamic Query


 / Published in: Smarty
 

URL: http://www.thenestedfloat.com/articles/expressionengines-sql-query-module

  1. Page:
  2. {embed="cart/display_user_carts" member_id="<?php global $SESS; echo $SESS->userdata['member_id'];?>"}
  3.  
  4. Sub-template:
  5. {exp:query sql="SELECT id, member_id, member_username, cart_name FROM cart_requests WHERE member_id = {embed:member_id} ORDER BY timestamp DESC"}
  6. <p>{cart_name}</p>
  7. {/exp:query}

Report this snippet  

You need to login to post a comment.