/** * Get the details for the specified group ID. * @param $groupid The ID of the group to get the details for. * @return Array An array of the group details. */ function WPPortfolio_getGroupDetails($groupid) { global $wpdb; $table_name = $wpdb->prefix . TABLE_WEBSITE_GROUPS; $SQL = "SELECT * FROM {$table_name} \n\t\t\tWHERE groupid = '" . $wpdb->escape($groupid) . "' LIMIT 1"; // We need to strip slashes for each entry. return WPPortfolio_cleanSlashesFromArrayData($wpdb->get_row($SQL, ARRAY_A)); }
/** * Get the details for the specified Website ID. * @param $siteid The ID of the Website to get the details for. * @return Array An array of the Website details. */ function WPPortfolio_getWebsiteDetails($siteid, $dataType = ARRAY_A) { global $wpdb; $table_name = $wpdb->prefix . TABLE_WEBSITES; $SQL = "SELECT * FROM {$table_name} \r\n\t\t\tWHERE siteid = '" . $wpdb->escape($siteid) . "' LIMIT 1"; // We need to strip slashes for each entry. if (ARRAY_A == $dataType) { return WPPortfolio_cleanSlashesFromArrayData($wpdb->get_row($SQL, $dataType)); } else { return $wpdb->get_row($SQL, $dataType); } }