/ Published in: Smarty
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Page: {embed="cart/display_user_carts" member_id="<?php global $SESS; echo $SESS->userdata['member_id'];?>"} Sub-template: {exp:query sql="SELECT id, member_id, member_username, cart_name FROM cart_requests WHERE member_id = {embed:member_id} ORDER BY timestamp DESC"} <p>{cart_name}</p> {/exp:query}
URL: http://www.thenestedfloat.com/articles/expressionengines-sql-query-module