compuskill Posted February 17, 2009 Share Posted February 17, 2009 Hi there, In a payment module, I need to use a mysql query containing the customers_id, but the problem is that the customers_id does not seem to be available in that module. That means: A mysql query works fine directly in the checkout_payment.php, but when I put the query into the payment module, it does not work anymore. What can I do to use the variable in my module? This is my query: $invoice_query = tep_db_query("select value from customers_to_extra_fields where customers_id='".$customer_id."'"); Thx for helping. Link to comment Share on other sites More sharing options...
germ Posted February 17, 2009 Share Posted February 17, 2009 This may work: $invoice_query = tep_db_query("select value from customers_to_extra_fields where customers_id='".(int)$customer_id."'"); If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
compuskill Posted February 17, 2009 Author Share Posted February 17, 2009 This may work: $invoice_query = tep_db_query("select value from customers_to_extra_fields where customers_id='".(int)$customer_id."'"); Thanks for the reply. Unfortunately, that does not work work neither... Link to comment Share on other sites More sharing options...
compuskill Posted February 17, 2009 Author Share Posted February 17, 2009 Thanks for the reply. Unfortunately, that does not work work neither... I guess I have it now. Just in case anyone is interested in it: You can make the variables available this way: global $your_variable; Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.