Php connects to the odbc data source and saves the query data. The php Tutorial connects to the odbc data source and saves the query data $ connstrdrivermicrosoftaccessdriver (*. mdb); dbq. realpath (db. mdb); $ connidodbc_connect ($ connstr, SQL _cur_use_odbc); $ o php connection to the odbc data source and save the query data
$ Connstr = "driver = microsoft access driver (*. mdb); dbq =". realpath ("db. mdb ");
$ Connid = odbc_connect ($ connstr, "", "", SQL _cur_use_odbc );
$ Odbc_exec = odbc_exec ($ connid, "insert into tablename (name) values ('name ')");
$ Query = odbc_do ($ connid, "select * from tablename ");
$ Odbc_result_all = odbc_result_all ($ query );
Echo $ odbc_result_all;
// Save data
$ Connstr = "driver = microsoft access driver (*. mdb); dbq =". realpath ("db. mdb ");
$ Connid = odbc_connect ($ connstr, "", "", SQL _cur_use_odbc );
$ Odbc_exec = odbc_exec ($ connid, "insert into t ...... ")
// Query www. bKjia. c0m
$ A = 0;
$ Begintime = time ();
While ($ a <100)
{
$ Conn = odbc_connect ("forphp tutorial", "sa", "sa ");
// Odbc_select_db ("[testyouhui]", $ conn );
$ Result = odbc_exec ("select [id], [name] from [test1]. [dbo]. [category]", $ conn );
$ A ++;
Odbc_close ($ conn );
}
$ Endtime = time ();
Echo $ begintime ."
";
Echo $ endtime ."
";
Echo date ('U second ', $ endtime-$ begintime );
Echo'
';
Connector connects to the odbc data source and saves the query data $ connstr = driver = microsoft access driver (*. mdb); dbq =. realpath (db. mdb); $ connid = odbc_connect ($ connstr, SQL _cur_use_odbc); $ o...