Page 1 of 1
Good SQL Statement Reference?
Posted: Wed Feb 18, 2004 6:11 am
by Sergeant Thorne
I've recently switched from ASP to PHP; particularly, right now, I'm looking into using a Microsoft Access database through PHP. I was a little frustrated at first with the apparent lack of any 'insert' command in any of the ODBC-compatible database function groups built into PHP, but I think I've pick up that it's possible to insert entries through executing an SQL statement (odbc_exec(), dbx_query(), or any other functions that allow for it). My question is, are there any good SQL Statement syntax reference resources online? Thanks a lot!
Posted: Wed Feb 18, 2004 7:53 am
by DCrazy
Um... why would you use Access through PHP? ODBC is incredibly slow, and Access doesn't support anywhere near all the features of a true RDBMS. Instead, use MySQL, available for free from
http://www.mysql.com .
But if you're really hell-bent on using Access, ALWAYS use SQL statements. They're much faster and much more flexible. Here's the syntax for an INSERT command:
<tt>INSERT INTO
table_name (
first_field_name,
second_field_name, ...) VALUES (
first_field_value,
second_field_value, ...)</tt>
The Access help file has a complete reference for all the SQL keywords that Access supports.
Posted: Thu Feb 19, 2004 1:22 pm
by Sergeant Thorne
Thank you very much, DCrazy. I had always been under the impression that MySQL was a very expensive piece of software (perhaps I was thinking of the Microsoft product). To find that this is free for my uses is great!
I'm going to be tinkering with SQL queries in ODBC until I get the MySQL Server that I downloaded set up. I have been diving into a lot of new things, having recently replaced my IIS with Apache 2.0, ASP with PHP, and now Access DBs with MySQL (though my experience with Access DBs doesn't run very deep). But, I very much prefer the PHP language to JavaScript/JScript (wish I could use it on client-side
), and I'm looking forward to using MySQL, which, I hear, and have seen to some degree, is very convienient/powerful.
Thanks again.
Posted: Thu Feb 19, 2004 7:15 pm
by SSX-Thunderbird
You are confusing MySQL with MS SQL. MySQL is 100% free.
Re: Good SQL Statement Reference?
Posted: Sat Mar 20, 2004 2:08 am
by R e v
Sergeant Thorne wrote:My question is, are there any good SQL Statement syntax reference resources online? Thanks a lot!
www.google.com
And, as the others have pointed out, MySQL is a much better solution than Access.