Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Abstract_Database_Store::read( string[]|string $keys )

Read object data from the database

Parameters Parameters


(string[]|string) (Required) Key name (or array of keys) to retrieve from the database.

Top ↑

Return Return

(array|false) Returns a key=>val array of data or false when record not found.

Top ↑

Source Source

File: includes/abstracts/

	private function read( $keys ) {

		global $wpdb;
		if ( is_array( $keys ) ) {
			$keys = implode( ', ', $keys );
		$res = $wpdb->get_row( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery
			$wpdb->prepare( "SELECT {$keys} FROM {$this->get_table()} WHERE {$this->get_primary_key()} = %d", $this->id ), // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- This query is safe.
		return ! $res ? false : $res;


Top ↑

Changelog Changelog

Version Description
3.14.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.