Jump to content

select from table


Recommended Posts

I want to select a row from a table where, e.g. name='george'

 

instead of writing 'george', can I use a variable like this?:

$xx = "george";

$result= mysql_query("SELECT * FROM Names WHERE name=$xx");

 

does this work?

 

I know I could try this on my own, but I do not have access to a database to test with,

and I am wondering if this is possible...

Link to comment
https://forums.phpfreaks.com/topic/49693-select-from-table/
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.