我应该使用mysql,mysqli还是PDO? [英] Should I use mysql, mysqli or PDO?
问题描述
我应该使用什么来进行一般的MySQL数据库访问?我已经使用传统的mysql扩展了很长时间了,但是我正在尝试将b / b
更新我的风格到更多的OOP范例。
我曾经短暂地使用过PDO,但我还没有使用过mysqli扩展程序。
我已经读过一些关于它的内容,看起来很好而且更多的OOP定位>
(大部分)。但是PDO似乎更通用和可转移。
任何评论?
TIA
Hi,
What should I be using for general MySQL database access? I''ve been
using the traditional mysql extension for ages, but I''m trying to
update my style to a more OOP paradigm.
I''ve used PDO briefly but I''ve not used the mysqli extension yet.
I''ve read a bit about it though, seems good and more OOP orientated
(for the most part). But PDO seems more generic and transferable.
Any comments?
TIA
推荐答案
.. oO(macca)
..oO(macca)
>我应该使用什么来进行一般的MySQL数据库访问?我已经使用传统的mysql扩展了很长时间,但我正在尝试将我的风格更新为更多的OOP范例。
我我已经简单地使用了PDO,但我还没有使用过mysqli扩展程序。
我已经阅读了一些关于它的内容,看起来很好,而且更多的OOP定位
(大部分)。但PDO似乎更通用和可转移。
>What should I be using for general MySQL database access? I''ve been
using the traditional mysql extension for ages, but I''m trying to
update my style to a more OOP paradigm.
I''ve used PDO briefly but I''ve not used the mysqli extension yet.
I''ve read a bit about it though, seems good and more OOP orientated
(for the most part). But PDO seems more generic and transferable.
如果可用,请使用PDO。
Micha
Use PDO if available.
Micha
macca写道:
macca wrote:
我应该使用什么来进行一般的MySQL数据库访问?我已经使用传统的mysql扩展了很长时间了,但是我正在尝试将b / b
更新我的风格到更多的OOP范例。
我曾经短暂地使用过PDO但是我还没有使用过mysqli扩展程序。
我已经读过一些关于它的信息,看起来很好而且更多OOP定向
(大部分)。但是PDO似乎更通用和可转移。
有任何意见吗?
TIA
Hi,
What should I be using for general MySQL database access? I''ve been
using the traditional mysql extension for ages, but I''m trying to
update my style to a more OOP paradigm.
I''ve used PDO briefly but I''ve not used the mysqli extension yet.
I''ve read a bit about it though, seems good and more OOP orientated
(for the most part). But PDO seems more generic and transferable.
Any comments?
TIA
如果我打算只使用mysql,我会使用mysqli类。我喜欢
他们的设计方式,它的开销比PDO少。
-
=== ===============
删除x来自我的电子邮件地址
Jerry Stuckle
JDS计算机培训公司
js ******* @ attglobal.net
==================
If I''m going to be using only mysql, I use the mysqli classes. I like
the way they''re designed and it has less overhead than PDO.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
11月4日下午1:51,Jerry Stuckle< jstuck ... @ attglobal.netwrote:
On Nov 4, 1:51 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
macca写道:
macca wrote:
Hi,
我应该如何使用一般MySQL数据库访问?我已经使用传统的mysql扩展了很长时间了,但我正在尝试将b / b
更新我的风格到更多的OOP范例。
What should I be using for general MySQL database access? I''ve been
using the traditional mysql extension for ages, but I''m trying to
update my style to a more OOP paradigm.
我曾经使用过PDO,但我还没有使用过mysqli扩展名。
我''虽然看了一下,看起来很好,更多OOP导向
(大部分)。但PDO似乎更通用和可转移。
I''ve used PDO briefly but I''ve not used the mysqli extension yet.
I''ve read a bit about it though, seems good and more OOP orientated
(for the most part). But PDO seems more generic and transferable.
有何评论?
Any comments?
TIA
TIA
如果我打算只使用mysql,我使用mysqli类。我喜欢
他们的设计方式,它的开销比PDO少。
-
=== ===============
删除x来自我的电子邮件地址
Jerry Stuckle
JDS计算机培训公司
jstuck ... @ attglobal.net
==================
If I''m going to be using only mysql, I use the mysqli classes. I like
the way they''re designed and it has less overhead than PDO.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
我用PHP的mysql编写了自己的数据库类功能,而不是使用mysqli,我已经添加了自动获取的功能,
插入和更新。最后,它比内置的
mysqli快得多,而且编写起来并不需要很长时间。
I''ve written my own database class using PHP''s mysql functions, rather
than using mysqli, and I''ve added functions to automatically get,
insert and update. In the end, it''s a lot faster than the built-in
mysqli, and it didn''t take long to write.
这篇关于我应该使用mysql,mysqli还是PDO?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!