Home > php教程 > php手册 > 用PHP取Select影响行数的方法

用PHP取Select影响行数的方法

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-21 09:09:11
Original
1190 people have browsed it

select

    由于PHP手册中大多没有提及,所以很多人用了select count(*)去取(前几天提问大家都这么答),而实际应用时这样的方法是很不方便,也非常低效率的...
    其实OCI库提供了一个OCIFetchStatement($stmt,$array)的函数,其功能是将$stmt的所有记录装入一个array中,其返回值就是记录总数,也就是我们需要的东东。
exp: $RowCount = OCIFetchStatement($stmt,$array);



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template