menriquez Posted June 1, 2008 Share Posted June 1, 2008 yes I was wondering if anyone knew of a way to dump the entire result set of a "select" query into a standard php arrray (without the obvious "loop through it and build your own") so I can use some of those nifty php array functions? thxs, - mark Link to comment https://forums.phpfreaks.com/topic/108298-loading-all-the-mysql-results-into-a-single-array/ Share on other sites More sharing options...
jamesnes Posted June 2, 2008 Share Posted June 2, 2008 If you're using PHP5 (>= 5.1.0), you can use PDO to perform your query and then use the fetchAll function, which returns an array of all the rows from a query. Link to comment https://forums.phpfreaks.com/topic/108298-loading-all-the-mysql-results-into-a-single-array/#findComment-555230 Share on other sites More sharing options...
menriquez Posted June 2, 2008 Author Share Posted June 2, 2008 PDO seems pretty groovy, I'll hack into it a bit... thanks for your quick reply! - mark Link to comment https://forums.phpfreaks.com/topic/108298-loading-all-the-mysql-results-into-a-single-array/#findComment-555246 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.