Function: JScms_field_not_exist
avatar
Señor FAQ

¡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.


Function: JScms_field_not_exist

The JScms_field_not_exist function checks whether a row exists in the specified table with a given field value.

Syntax


JScms_field_not_exist($jakdb, $table, $field, $check)
    

Parameters

  • $jakdb: (object) An instance of the database connection using JAKWEB\JAKsql.
  • $table: (string) The name of the database table to query.
  • $field: (string) The field name to check.
  • $check: (mixed) The value to check for in the specified field.

Returns

(bool) Returns true if the field value exists in the table, or false otherwise.

Example Usage


<?php
// Check if the email exists in the "users" table
if (JScms_field_not_exist($jakdb, 'users', 'email', 'example@example.com')) {
    echo "Email exists.";
} else {
    echo "Email does not exist.";
}
?>
    
Was this article helpful?
0 out of 0 found this helpful