UrlGuy
07-25-2005, 04:10 PM
Hi,
I have the program which requires a ODBC connection to input and output data. To get ODBC I whent into Win2k3's start menu, administrative tools and ODBC.. from there I added username, pass, made the db.mdb file and have tested the connection with PHP and it works to connect and query the tables.
But the syntax is a little different for ODBC I believe..
I use this in ODBC to create a table, and it works:
CREATE TABLE users (output VARCHAR(255) NOT NULL);
But I want like with MySQL you can have each new input in the database to be assigned a numeric id which increasing with each new input to the database. To do the same and include a numeric id only in MySQL I would do this:
CREATE TABLE `users` (
`id` INT( 6 ) NOT NULL AUTO_INCREMENT ,
`output` VARCHAR( 255 ) NOT NULL ,
PRIMARY KEY ( `id` )
);
And this works in MySQL and NOT in ODBC...
I have looked around but couldnt find another way to do this:confused:
Hope anyone can help or have any tips or similar.
Grateful for all response.:)
Thanks,
~UrlGuy;)
I have the program which requires a ODBC connection to input and output data. To get ODBC I whent into Win2k3's start menu, administrative tools and ODBC.. from there I added username, pass, made the db.mdb file and have tested the connection with PHP and it works to connect and query the tables.
But the syntax is a little different for ODBC I believe..
I use this in ODBC to create a table, and it works:
CREATE TABLE users (output VARCHAR(255) NOT NULL);
But I want like with MySQL you can have each new input in the database to be assigned a numeric id which increasing with each new input to the database. To do the same and include a numeric id only in MySQL I would do this:
CREATE TABLE `users` (
`id` INT( 6 ) NOT NULL AUTO_INCREMENT ,
`output` VARCHAR( 255 ) NOT NULL ,
PRIMARY KEY ( `id` )
);
And this works in MySQL and NOT in ODBC...
I have looked around but couldnt find another way to do this:confused:
Hope anyone can help or have any tips or similar.
Grateful for all response.:)
Thanks,
~UrlGuy;)
