PDO :: fetch()限制1 [英] PDO::fetch() LIMIT 1
本文介绍了PDO :: fetch()限制1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是否需要使用PDO的fetch()
方法编写LIMIT 1
?假设我只需要一个结果.我想知道,使用LIMIT 1
是否有助于节省资源和加载时间?
Do I need to write LIMIT 1
using PDO's fetch()
method? This assumes that I need only one result. I'm wondering, does using LIMIT 1
will help to save resources and loading time?
推荐答案
它可以为您提供帮助. http://dev.mysql.com/doc/refman/5.0 /en/limit-optimization.html 在此主题上非常清楚.
It can help you. http://dev.mysql.com/doc/refman/5.0/en/limit-optimization.html is quite clear on this topic.
这篇关于PDO :: fetch()限制1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文