Welcome Guest, Not a member yet? Register   Sign In
how to deal with .com in SQL query?
#1

I am building this string to use in a query. 

$where$where="email=".$this->session->userdata('userid')." AND campaign=".$this->session->userdata('campaign');

In my example this correctly becomes:
"[email protected] AND campaign=Apple"

But when I try running the following line
$crud->set_relation('bus_comp','business_components','bus_comp',$where);

I get an error:

SELECT COUNT(*) AS `numrows` FROM `business_components` WHERE `email` = `richb201@gmail`.`com` AND `campaign` = `Apple`

How do I stop the "." in the email address from being taken as just a "."? 
proof that an old dog can learn new tricks
Reply


Messages In This Thread
how to deal with .com in SQL query? - by richb201 - 09-10-2020, 04:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB