SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
Thread: PHP and MSSQL
-
Aug 29, 2001, 12:08 #1
- Join Date
- Nov 2000
- Location
- Hong Kong
- Posts
- 1,508
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
PHP and MSSQL
Hi,
For my mailing list script (MyMail) some user asked me if it was possible to use mssql instead of Mysql. The problem is that I've never used ms sql and was wondering that syntax differences they have.
From the resources(limited) that i've found, it looks to be the same, but is there anything much difference except having to use: mssql_x instead of mysql_x.
The queries that I have aren't very complex and are plain insert into.. select from...update table...no links of any sort.
Thanks
-Peter
-
Aug 29, 2001, 12:16 #2
- Join Date
- Jan 2001
- Location
- buried in the database shell (Washington, DC)
- Posts
- 1,107
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
The only problem will be the 'LIMIT' extension in MySQL. It does not exist in T-SQL (which is what MS SQL and Sybase use) so you will have to find a workaround if you find any limit commands.
Also, MySQL allows this for some unknown reason:
Code:SELECT * FROM table WHERE some_integer_column = '4333'
Another minor thing is if you are using an auto_increment column you would insert like this (bob( somecol AUTO_INCREMENT, somethingelse CHAR( 5 )):
Code:INSERT INTO bob VALUES( NULL, 'happy' );
Code:INSERT INTO bob VALUES( 'happy' ) GO
Matt - Sybase DBA / PHP fanatic
Sybase/MySQL/Oracle | I don't like MySQL
Download Sybase | DBForums.com - for all your RDBMS talk
Bookmarks