getASSOC / PgetASSOC
Executes the SQL and returns an associative array for the given query.
If the number of columns returned is greater to two, a 2-dimensional array is returned, with the first column of the recordset becomes the keys to the rest of the rows. If the columns is equal to two, a 1-dimensional array is created, where the the keys directly map to the values.
If an error occurs, false is returned.
|$sql:||The MySQL query to perfom on the database.|
Prepared statements Parameters
|$sql:||The MySQL query to perfom on the database|
|$varN:||The variable(s) that will be placed instead of the ? placeholder separated by a ',' or it can be the method Prepare.|