PHP Availability"[]\ Query with mySQL -


this first php application i've ever made; started learning php week, don't kill me, ok? ;)

i'm trying use script find djs in our database available. reason, when manually enter region like:

 'regions' \'tn_tricities\' 

it returns results, when enter like:

 $region = 'tn_tricities'  ...  `regions` \'$region\' 

it doesn't return results. idea how fix this? or if i'm totally going in wrong direction , not best way check availability, please let me know!

the full code:

 $region = $_get['region'];  $date = $_get['date'];   require "connect.php";  echo $region;  $sql = 'select `vendorname`, `vendorbio`, `vendortype`, `regions`  `vendors` `regions` \'$region\' , `datesbooked` not  \'$date\'  , `datesunavailable` not \'$date\' '; 

try one,

$region = $_get['region']; $date = $_get['date'];  require "connect.php"; echo $region;  $sql = "select `vendorname`, `vendorbio`, `vendortype`, `regions` `vendors` `regions` '$region' , `datesbooked` not '$date'  , `datesunavailable` not '$date' "; $result = mysql_query($sql); 

hope works.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -