My problem goes something like this:
I have a form that accesses a table called users with a name column
$name = $_POST['name']
$query = "SELECT * FROM OPENQUERY(userfile,'SELECT * FROM USERS where name = "$name" ')";
The effect would supposedly be to select the info of the given user's name; problem is, when i put the quotes around $name, it gives an error about invalid syntax.
How do you properly use the openquery function if I want such an effect?
I have a form that accesses a table called users with a name column
$name = $_POST['name']
$query = "SELECT * FROM OPENQUERY(userfile,'SELECT * FROM USERS where name = "$name" ')";
The effect would supposedly be to select the info of the given user's name; problem is, when i put the quotes around $name, it gives an error about invalid syntax.
How do you properly use the openquery function if I want such an effect?