Expression Engine Dynamic Query


/ Published in: Smarty
Save to your folder(s)



Copy this code and paste it in your HTML
  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}

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.