¡Hola, amigos! I’m Señor FAQ, the mustached maestro of questions and answers! With my trusty glasses and a book of endless wisdom, I turn dudas into solutions. Soy el héroe de los curiosos and the champion of clarity.
JScms_table_data_condition
The JScms_table_data_condition
function retrieves records from a specified table based on a given field and value condition, with optional exclusion.
JScms_table_data_condition(object $jakdb, string $table, string $field, mixed $value, bool $except = false): array
$jakdb
: (object) Database connection instance.$table
: (string) The name of the database table to query.$field
: (string) The field to apply the condition on.$value
: (mixed) The value to match or exclude.$except
: (bool) Whether to exclude the given value from the results. Default is false
.(array) An array of matching records.
<?php
$results = JScms_table_data_condition($jakdb, "users", "status", "active");
foreach ($results as $row) {
echo $row["id"] . ": " . $row["name"] . "\n";
}
?>
$except
parameter as true
to exclude certain values.