+2  A: 

You should use string concatenation to build your query, like

"SELECT * FROM table WHERE param = '" . $value . "'"

So, your query should look like:

$qu="SELECT DISTINCT bk.bookname,bk.author,bk.publisher,bk.edition,bk.description,lam.article_name,bk.keywords,bk.qtyinstock FROM lib_article_master lam, lib_book_cd_master bk WHERE bk.bookname='".$arr[2]."' AND bk.author='".$arr[3]."' AND bk.publisher='".$arr[4]."' AND bk.article_id=lam.article_id";

Also, don't forget to escape string variables with mysql_real_escape_string().

habicht
nope... it's not giving the output.behaving same as before now also !thanx for trying
dev646
habicht is right, did you have a typo?
Hogan
actually tried all methods. And no bugs as of now. Anyways trying to code in a different manner to see for some +ve changes. thanx people. Anyways, got some clues while experimenting... 'It's something related to the multiple WHERE conditions.' and the data i'm trying to retrieve is a 'MEMO' type. :)
dev646
If the query works if you run it manually and it doesnt if you use Ajax - there might be something on the Ajax side. Use FireBug extension to Firefox to debug Ajax - it's very usefull, you can see all your ajax requests and responses.
habicht
A: 

Got it at last... PHEW... Just include 'TRIM()' and comparison problem got solved .Don't know still how it managed to work when code was pasted from browser but anyways its working. giving the code below ...

$fr0=trim($arr[0], "");//'TRIMS' ALL UNWANTED SPACES FOR COMPARISON TO BE PERFECT
$fr1=trim($arr[1], "");
$fr2=trim($arr[2], "");
$fr3=trim($arr[3], "");
$bkr0=strtolower($fr0);//HERE EVERY SINGLE CHARCTER IS TURNED TO 'LOWER CASE' TO REMOVE ALL POSSIBLE WAYS OF ERRORS IN COMPARISON
$bkr1=strtolower($fr1);
$bkr2=strtolower($fr2);
$bkr3=strtolower($fr3);
//NOW COMPARISON FOR EACH VALUE IS DONE IN A WHILE LOOP BY 'mysql_fetch_row'

thank u all for your effort... it really meant a lot !

dev646