Jump to content

Multiple variables in a mysql query


codeeighty

Recommended Posts

I'm not sure if it possible but what I want to try to do is use 2 variables in a mysql query, such as:

 

"SELECT * FROM table WHERE '$var1' = '$var2'" ;

 

Which doesn't work, there is no error returned and the page never loads, probably messed up syntax

 

The variables would come from a  form with two text boxes, the idea being the ability to display the selected catagory with it's data.

 

I'm sure this is not the best way to do something like this, but this is as far as I've gotten, is something like this possible?

Thanks

Link to comment
https://forums.phpfreaks.com/topic/264707-multiple-variables-in-a-mysql-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.