Posts Tagged ‘WordPress’

Create Admin in WordPress through Code

More than once I have encountered a situation where client forgot the login credentials of WP-Admin and I ended up creating a new user or resetting the password of existing user by updating the functions.php file of active theme.

Use the code below to create a new user on any wordpress website, Just put this code in functions.php file and reload the website in browser. Afterwards, delete the code from functions.php




Function Reference / get_results – ezSQL

ezSql - get_results


get_results is a method of ezSql Class and it is used to retrieve multiple row results. This function returns the entire query result as an array. Each element of this array corresponds to one row of the query result and like get_row (ezSql), can be an object, an associative array, or a numbered array.

If no matching rows are found, or if there is a database error, the return value will be an empty array. If your $query string is empty, cached result from last query are returned and if you pass an invalid $output_type,nothing will be returned.

Read On…