pmaojo Posted April 28, 2014 Share Posted April 28, 2014 (edited) Hello Im stucked on a problem related with this... Can anyone help me? I want to insert the customer ID into the SQL query with WHERE. How could I use the customer ID variable of Prestashop here to make this work and only show the user his rows?: $eventos = Db::getInstance()->executeS('SELECT * FROM `pss_tabla` WHERE id_cliente= customer_id }'); Edited April 28, 2014 by pmaojo (see edit history) Link to comment Share on other sites More sharing options...
pmaojo Posted April 28, 2014 Author Share Posted April 28, 2014 (edited) global $smarty; $userid = $this->context->customer->id; $eventos = Db::getInstance()->executeS("SELECT * FROM pss_ev WHERE id_cliente=$userid"); $this->context->smarty->assign('ev', $ev); Edited April 28, 2014 by pmaojo (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now