Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_php thread: Help! Cannot execute query!


Message #1 by Empier4552@a... on Fri, 5 Jul 2002 08:07:14
Try some single quotes.

>$sql = "SELECT * FROM $type
>	WHERE Groom_Surname = \"$Surname\" OR Bride_Surname = \"$Surname\"
>	"; 
>
$sql = "SELECT * FROM '$type' WHERE Groom_Surname = '$Surname' OR Bride_Surname = '$Surname'";	 

I don't know if you need to single quotes for $type, but they will help 
for the other two variables.


>$sql = "SELECT * FROM $type
>	WHERE Surname = \"$Surname\"
>	";
>
$sql = "SELECT * FROM '$type' WHERE Surname = '$Surname'";




  Return to Index