here's the first release... only a few functions so far, any input would be appriciated
Title: MySQL UDF functions
Description: A collection of functions for interacting with MySQL
Author: cdkid <email@example.com>
Requirements: Autoit V3 with COM support.
Note: Make sure to add _MySQLEnd to the end of any script you use this with or you will have open connections to your DB left open!!!!
Note2: at the end of your script i find that it helps to turn your connection object (in the examples i use $sql) to "" so add $sql = "" to the end
Note3: I think it is because using COM from a non-server connecting to a DB on a server, but these can take an EXTREMELY long time.
Open a connection to the specified Database
Close the connection (read notes!)
Adds a record to a specified table
Deletes a record from the specifed table.
Execute a query to the database
Adds a table to the database
Adds a column to the given table
Deletes a column from the given table
Deletes a table from the given DB
Counts the number of records in the given column
Counts the number of tables in the database
Gets the names of all the columns in the given table
Gets the names of all the tables in the database
Gets all of the values of the specified column
Gets the DATA TYPE of the specified column
Gets a count of all columns in the specified table
Find out whether or not a specified table exists
Get a list & count of databases on the current server.
Change your connection string.
any input would be much appreciated! i hope this helps someone
The MySQL ODBC 3.51 DRIVER IS REQUIRED FOR THIS
it can be downloaded here: http://dev.mysql.com/downloads/connector/odbc/3.51.html
1/27/06 2:27 PM - Added _CreateTable
1/27/06 4:43 PM - Added _CreateColumn
1/27/06 5:14 PM - Added _DropCol and _DropTbl
1/28/06 2:01 PM - Added _CountRecords
1/28/06 10:02 PM - Added _CountTables
1/29/06 3:34 PM - Added _GetColNames
1/30/06 11:26 AM - Added _GetTblNames
2/06/06 12:29 PM - Added _GetColVals
2/08/06 8:24 PM - Added _GetColCount and _GetColType
2/21/06 10:17 PM - Added _MySQLTable exists, and am in process of updating these for submitting to the Standard UDF Library.
3/09/06 10:27 AM - Added _GetDBNames
3/09/06 5:29 PM - Added _ChangeCon
3/17/06 12:39 PM - Updated _MySQLConnect to set @Error to 2 if the MySQL ODBC Driver is not installed.
8/30/06 7:56 PM - Fixed a problem with _AddRecord (Thanks burthold)\
7/31/07 1:51 PM - Updated _MySQLConnect and _ChangeCon to allow a user specified port
v1.6 - 1964
v1.5 - 756
v1.4 - 60
v1.3 - 150
Below is a .ZIP called "ODBC_DRIVER_SETUP" it has the au3 for driver setup, read _ReadMe_.txt to see how to make it work.
Edited by cdkid, 31 July 2007 - 07:01 PM.