Puedes intentar agregar comillas
"SELECT * FROM Rest_Category
INNER JOIN Rest_Details
ON Rest_Category.CategoryID = Rest_Details.Cat_ID
INNER JOIN Delivery_Pcode
ON Delivery_Pcode.Restaurant_ID = Rest_Details.Resturant_ID
WHERE Delivery_Pcode.Pcode= '$searchq'";
o (antes de una desinfección de entrada adecuada)
"SELECT * FROM Rest_Category
INNER JOIN Rest_Details
ON Rest_Category.CategoryID = Rest_Details.Cat_ID
INNER JOIN Delivery_Pcode
ON Delivery_Pcode.Restaurant_ID = Rest_Details.Resturant_ID
WHERE Delivery_Pcode.Pcode= '" . $searchq ."';";