0

SELECT * FROM admin where company='test & test'
I am running this query but getting error due to &.while printing Its showing
SELECT * FROM admin where company='test ',not accepting & in sql query

Can we run using & in query
need suggestion.

4
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by jacob21
0

I just tried a query in phpmyadmin with a '&' in the query and it accepted it just fine. I don't have any data with an & in the data so I didn't get any results but it did accept it.

0

I tried your both query. It works fine.

SELECT * FROM admin where company='test & test'
I am running this query but getting error due to &.while printing Its showing
SELECT * FROM admin where company='test ',not accepting & in sql query

Can we run using & in query
need suggestion.

0

I've had this issue before. It would work doing a simple SQL statement in phpMyAdmin for example but wouldn't work within my PHP script. Is this your problem as well?

I don't know the solution as I haven't encountered it again lately.

0

its not working with in PHP script.but working fine in my sql.
SELECT * FROM admin where company='test & test'

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.