Issue Bug Closed

#24104Replace exec_SELECTgetRows with exec_SELECTgetSingleRow whenever a single record is expected

Jo Hasenau 11/17/10, 15:33 updated 03/29/11, 23:43

Description

In the core the method exec_SELECTgetRows is used to fetch records from the DB. Often this method is uses, even though there is just one single record expected as a result.

Attached patch replaces exec_SELECT-getRows with exec_SELECTgetSingleRow for each case dealing with single records.

Indicators are:
list(blah) is used in front of exec_SELECTgetRows
$blah0 is used only
array_shift is used and the rest of the array stays untouched
LIMIT 1 is used within the method

and the array is not used with any foreach loop.

(issue imported from #M16445)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.