Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

(click on this box to dismiss)

cubrid shard with PHP driver


I've done some tests with cubrid shard and it seems that I cannot use mysql driver for PHP and that I have to use cubrid driver for PHP. I've read that it was compatible with MySQL but it seems that it just means that it can be used to shard a MySQL database and that cubrid driver's functions have similar names to mysql driver's functions. My aim is to use cubrid shard with an existing PHP application that uses MySQL as its database. Here is my question :

In my tests, I realized that I MUST use cubrid driver for PHP and that prepared queries are mandatory. Am I true or is there anything wrong in my code ?


link comment (0) accepted answer
asked 4 years ago
24 Answers
Hi cscetbon,
  1. In order to use CUBRID SHARD you need to use CUBRID drivers. In your case it's PHP or PDO driver. This is because CUBRID and MySQL are two different software. They talk on different protocols, despite the fact that they both support SQL.
  2. However, at this moment CUBRID PHP/PDO drivers do not support CUBRID SHARD Broker. Refer to this issue for details. We will release a patch to PHP/PDO driver soon, and then you can use CUBRID SHARD in your PHP applications.
  3. Since CUBRID supports SQL92 standard, the MySQL SQL queries in your application are likely to be compatible when you port your app to CUBRID, i.e. you may not be required to change your queries.
  4. However, in order to use CUBRID SHARD you need to change your application to use CUBRID PHP driver.
  5. CUBRID PHP/PDO drivers support similar functions as MySQL PHP driver does, i.e. you can find equivalent functions in CUBRID API.
  6. Prepared queries are not mandatory. You can directly execute queries if you want. In depends on you.

Let me know if you have other questions.

link comment (6)
answered 4 years ago

You are either using a very old browser or a browser that is not supported.
In order to browse you need to have one of the following browsers:

Internet Explorer: Mozilla Firefox: Google Chrome: