Why this MySQL Query Not working? -



Why this MySQL Query Not working? -

i have wrote mysql query check rows between given start , finish time, doesn't work, please help me find error?

query:

select * users user_id='".$input['guard']."' , (start_time >= '".$startdatetime."' or finish_time <= ".$finishdatetime."'

error:

syntax error or access violation: 1064 have error in sql syntax; check manual corresponds mysql server version right syntax utilize near '' @ line 3 (sql: select * users user_id='13' , (start_time >= '2014-10-20 10:30:00' or finish_time <= '2014-10-20 21:30:00' )

$guard=$input['guard']; $sql="select *from users user_id='$guard' , (start_time >='$startdatetime' or finish_time <='$finishdatetime')";

mysql

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -