Home > Back-end >  C, JAVA, PHP to connect to the database
C, JAVA, PHP to connect to the database

Time:09-28

For database connection problem don't understand, I want to ask about C, JAVA, PHP to connect to the database, for JAVA and PHP to connect to the database to know is:
1, Java, connect to the database using the JDBC data source,
2, PHP directly connect to the database using corresponding function,
3, c # database using ODBC data source connections,
I want to ask next:
1, C language how to connect to the database?
2, Java, c # can directly connect to the database, why if you can use the data source?
3, PHP can connect to the database data source?
4, to connect the mysql database is mysql function provides you, all language can support these functions?

CodePudding user response:

C language with API functions directly links, connection pool to write their own, Java with own JDBC because JDBC connection pool, Java is generally not even directly. Using C development, to find a third party link library had better use a third party, mysql mysql++ can use,

CodePudding user response:

C/C + +/C # under the Windows commonly used ADO, ADO is actually Microsoft to each client API to encapsulate database products
JAVA must be JDBC and data products will provide the driver
As for PHP scripts and mysql, PHP scripts with encapsulation, baidu search a handful


Try to baidu, although bad, but a little bit stronger's better than nothing