Hi MLambert,
I Think you want to connect to the database. The code that i use is:
DECLARE CUSTOMTYPE LIBRARY "mysql_helper"
FUNCTION offset_to_string$ ALIAS offset_to_offset (BYVAL offset AS _OFFSET)
FUNCTION offset_at_offset%& (BYVAL offset AS _OFFSET)
END DECLARE
DECLARE DYNAMIC LIBRARY "mysql"
FUNCTION mysql_init%& (BYVAL always_0 AS _OFFSET)
FUNCTION mysql_error$ (BYVAL mysql AS _OFFSET)
FUNCTION mysql_get_client_info$
FUNCTION mysql_real_connect%& (BYVAL mysql AS _OFFSET, host AS STRING, user AS STRING, password AS STRING, db AS STRING, BYVAL port AS _UNSIGNED LONG, BYVAL unix_socket AS _OFFSET, BYVAL client_flag AS _UNSIGNED _OFFSET)
FUNCTION mysql_real_connect_dont_open%& ALIAS mysql_real_connect (BYVAL mysql AS _OFFSET, host AS STRING, user AS STRING, password AS STRING, BYVAL db AS _OFFSET, BYVAL port AS _UNSIGNED LONG, BYVAL unix_socket AS _OFFSET, BYVAL client_flag AS _UNSIGNED LONG)
SUB mysql_query (BYVAL mysql AS _OFFSET, mysql_command AS STRING)
FUNCTION mysql_query& (BYVAL mysql AS _OFFSET, mysql_command AS STRING)
FUNCTION mysql_store_result%& (BYVAL mysql AS _OFFSET)
FUNCTION mysql_num_fields~& (BYVAL result AS _OFFSET)
FUNCTION mysql_num_rows&& (BYVAL result AS _OFFSET)
FUNCTION mysql_fetch_row%& (BYVAL result AS _OFFSET)
FUNCTION mysql_fetch_lengths%& (BYVAL result AS _OFFSET)
SUB mysql_close (BYVAL mysql AS _OFFSET)
SUB mysql_free_result (BYVAL result AS _OFFSET)
END DECLARE
DIM SHARED errf AS LONG
DIM SHARED conn AS _OFFSET
conn = mysql_init(0)
DIM columns AS LONG
REDIM SHARED DB_RESULT(columns, rows) AS STRING
IF conn = 0 THEN
PRINT "I Don't connect to MYSQL client!": SLEEP (0): x$ = INKEY$
ELSE
PRINT "connected"
END IF
DIM conexion AS _OFFSET
'*** Open Database ***
conexion = mysql_real_connect(conn, "127.0.0.1", "root", "key", "database", 0, 0, 0)
IF conexion = 0 THEN PRINT "I don't connect to database": x$ = INPUT$(1)
Best regards