0

In my database, I have a table with a column Customer Name. When I use select statement like

select * 
from data 
where Customer Name = '".$uname."' 
limit 1

it does not work because of the SPACE between "Customer" and "Name".

But when I write

select * 
from data 
where CustomerName = '".$uname."' 
limit 1

and change column name in the database table, the problem is solved.

How can I solve this with out renaming column name in DB?

marc_s
  • 704,970
  • 168
  • 1,303
  • 1,425

0 Answers0