Warning: pg_query_params(): Query failed: ERROR: relation "users" does not exist LINE 1: SELECT * FROM users WHERE email = $1 ^ in /var/www/html/lib/user.class.php on line 203
Fatal error: Uncaught Exception: Error in: class:user | function:emailcheck in /var/www/html/lib/user.class.php:207 Stack trace: #0 /var/www/html/lib/user.class.php(155): user->emailcheck('abc@123.com') #1 /var/www/html/login.php(60): user->register('abc@123.com', 'abc123', 'abc') #2 {main} thrown in /var/www/html/lib/user.class.php on line 207
Looking at the lines 203 - 207 of user.class.php
$sql = "SELECT * FROM $this->user_table WHERE email = $1";
$result = pg_query_params($this->link, $sql, $params);
if ($result === false) {
$message = 'Error in: class:user | function:emailcheck';
$code = 1;
throw new Exception($message, $code);
Checking in postgres DB imported all SQL files to database and edited to suit configuration but error is still throwing.
This is at login.php on submit registration.
Some additional info from psql
List of relations
Schema | Name | Type | Owner | Table
--------+----------------+-------+----------+-------------
public | pk_id | index | postgres | chat
public | plk_email | index | postgres | users
public | subscribers_pk | index | postgres | subscribers
(3 rows)
postgres=# \d users
Table "public.users"
Column | Type | Collation | Nullable | Default
-----------------+---------------+-----------+----------+-----------------------------------------------
email | text | | not null |
password | text | | |
auth_code | text | | |
verified | integer | | |
channel_name | text | | |
channel_title | text | | |
stream_key | character(10) | | |
display_name | text | | |
profile_img | text | | not null | '/profiles/default/profile_default.png'::text
api_key | text | | |
chat_jp_setting | text | | |
is_admin | boolean | | |
offline_image | text | | not null | '/profiles/default/offline_default.jpg'::text
Indexes:
"plk_email" PRIMARY KEY, btree (email)
Referenced by:
TABLE "subscribers" CONSTRAINT "host_account_fk" FOREIGN KEY (host_account) REFERENCES users(email) ON DELETE CASCADE
I am not used to Pgsl DB use so this might be some issue from setup.
Any advice or help would be great.
Looking at the lines 203 - 207 of user.class.php
Checking in postgres DB imported all SQL files to database and edited to suit configuration but error is still throwing.
This is at login.php on submit registration.
Some additional info from psql
I am not used to Pgsl DB use so this might be some issue from setup. Any advice or help would be great.
Thanks