<?php
error_reporting(E_ALL);
require_once 'merchant/config.php';

if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully\n";

$result = $conn->query("SHOW TABLES LIKE 'users'");
if ($result->num_rows > 0) {
    echo "Table 'users' exists\n";
    $res = $conn->query("SELECT mobile, password FROM users LIMIT 1");
    if ($res->num_rows > 0) {
        $row = $res->fetch_assoc();
        echo "User found: " . $row['mobile'] . "\n";
    } else {
        echo "No users found in table\n";
    }
} else {
    echo "Table 'users' does not exist\n";
}
?>
