Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register


1
(click on this box to dismiss)

cubrid shard with PHP driver

Hi,

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 ?

thanks 

link comment (0) accepted answer
asked 11 months ago
cscetbon
15
24 Answers
0
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 http://jira.cubrid.org/browse/APIS-546 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 11 months ago
admin
86
tagged




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



Internet Explorer: Mozilla Firefox: Google Chrome: