php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #5440 Major Design Flaw(s) in FilePro access
Submitted: 2000-07-07 20:32 UTC Modified: 2001-02-20 07:23 UTC
From: gilem at wsg dot net Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.1pl2 OS: all
Private report: No CVE-ID: None
 [2000-07-07 20:32 UTC] gilem at wsg dot net
filepro access has some major design flaws.

The two functions that are currently used to pull data from a db are filepro_rowcount, and filepro_retrieve.  filepro_rowcount returns the number of rows in the db that are NOT deleted.  filepro_retrieve returns a row/column of the database, regardless of whether or not the row is (not) deleted.  This makes it impossible for php to actually retrieve only the undeleted rows from the table.  

Recommendations:
We have added an additional function in order to check if a row is deleted (filepro_is_deleted), and are happy to contribute this code.  However, because of the inefficiency of the current retrieve function, we recommend adding a new function to obsolete the retrieve function.   This function should be written like the dbase getrecord function, that returns a deleted member along with all the fields in a given record.  

In addition, the filepro_rowcount function is essentially useless, since it gives you the number of undeleted records.  In order to improve the results of someone who is currently using this to iterate through their db, it is recommended that this function be changed to return the total (deleted or undeleted) number of records.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-18 09:40 UTC] sniper@php.net
If you have made some improvements for the code,
please send a patch made against the latest CVS
(cvs diff -u)
and someone will commit it if it is good.

--Jani
 [2001-02-20 07:23 UTC] sniper@php.net
No feedback. Changed to change request. Reopen if still a problem for you.

--Jani 

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 15:01:28 2024 UTC