¡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_row_exist
The JScms_row_exist
function checks whether a row exists in the specified table by its ID.
JScms_row_exist($jakdb, $id, $table)
$jakdb
: (object) An instance of the database connection using JAKWEB\JAKsql
.$id
: (int|string) The ID of the row to check.$table
: (string) The name of the database table to query.
(bool) Returns true
if a row with the given ID exists in the table, or false
otherwise.
<?php
// Check if a user exists by ID
if (JScms_row_exist($jakdb, 123, 'users')) {
echo "User exists.";
} else {
echo "User does not exist.";
}
?>