Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-01-20 16:15:01

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

safe_rows() vs. safe_rows_start()

Any reason to use safe_rows_start() in preference to safe_rows()? As far as I can tell they’re the same except the latter also goes through mysql_free_result(). Is it a question of performance, i.e. only use safe_rows() where you expect very large sets of records? Or is it more a case of six of one, half a dozen of the other? Why have both functions?


Code is topiary

Offline

#2 2009-01-20 16:35:00

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: safe_rows() vs. safe_rows_start()

safe_rows_start returns a link identfier (and is typically used in combination with the nextRow function), while safe_rows returns an associative array. Quite different.

Offline

#3 2009-01-20 16:38:44

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: safe_rows() vs. safe_rows_start()

Once again, thanks for the helpful explanation. Gotta pay closer attention…


Code is topiary

Offline

Board footer

Powered by FluxBB