¡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_field_not_exist_double
The JScms_field_not_exist_double
function checks whether a row exists in the specified table with two field values.
JScms_field_not_exist_double($jakdb, $table, $field, $check, $field2, $check2)
$jakdb
: (object) An instance of the database connection using JAKWEB\JAKsql
.$table
: (string) The name of the database table to query.$field
: (string) The first field name to check.$check
: (mixed) The value to check for in the first field.$field2
: (string) The second field name to check.$check2
: (mixed) The value to check for in the second field.
(bool) Returns true
if the combination of field values exists in the table, or false
otherwise.
<?php
// Check if a user with a specific email and username exists
if (JScms_field_not_exist_double($jakdb, 'users', 'email', 'example@example.com', 'username', 'example_user')) {
echo "User exists.";
} else {
echo "User does not exist.";
}
?>