Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems connecting to an Access database

Status
Not open for further replies.

jennyflower

Programmer
Oct 10, 2006
60
GB
Hi,

I seem to having some problems when I want to do something like to an Access database:

$sql = "SELECT [Field Name] FROM table WHERE [Field Name] > " . $_GET['greaternumber'] . "";

I have tried putting single quotes around the php variable with no effect and I think its something to do with the fact that the where field has a space in it.

Can anyone help me? I am using an ADO connection to do this btw

Thanks
 
Its ok, I think Ive sorted it, Don't really know how but I just write a query in Access then viewed the sql for it and copied it into my code. For some reason I haven't managed to write one without doing this, I must be making slight errors in my code, but thanks it all good
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top