How to insert php variable into mysql query? -


i have following statement:

 select bname,cnum,vnum, match(vtext) against (''".$word."'') relevance kjv  match(vtext) against (''".$word."'') , bnum='".$book."' order relevance desc, bnum, cnum, vnum limit 0,1"); 

which returns empty rows, if substitute variables hardcoded values, goes through. variables not null, know because output them page after type them in box. thanks

it better see more of surrounding code, expect it's double single quotes causing problem:

select bname,cnum,vnum, match(vtext) against ('".$word."') relevance kjv  match(vtext) against ('".$word."') , bnum='".$book."' order relevance desc, bnum, cnum, vnum limit 0,1"); 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -