MySQL query working in phpmyadmin but not in PHP -
i've created mysql view expecting 2 parameters , i'm able query without problems in phpyadmin following sql-string:
set @date1 = '2014-02-06'; set @date2 = '2014-02-07'; select * _myquery
it not work under php - i'm getting following error:
you have error in sql syntax; check manual corresponds mysql server version right syntax use near 'set @date2 = '2014-02-07'; select * _myquery' @ line 2
when it's working in phpmyadmin, shouldn't work under php? idea what's wrong?
do need mysql variables? because select
query not using them. can try with
select * _myquery
but if need use mysql variables, take @ this:
Comments
Post a Comment