i'm trying to use chatify on my project
in messager page it show always the name Chatify Messenger
i want to display the user name who im talking with
how to do this
btw my user table doesn't have name column
it have fname and lname
so what i should change to display user fname or lname
user table : https://ibb.co/CKTw1TZ
chatify view : https://ibb.co/F7MJqNQ
Replace "Chatify Messenger" to fname or lname
Related
I am using supabase for the first time and I am facing a problem on the signup process.
I use a database function, using the model from the SQL editor quick start. Here is the function I use, triggered on on_auth_user_created :
begin
insert into public.profiles (id, full_name, team)
values (new.id, new.raw_user_meta_data->>'full_name', new.raw_user_meta_data->>'team');
return new;
end;
This is the database structure :
Table teams :
id : int8
name : text
Table profiles :
id : uuid references auth.user.id
team : int8 references public.teams.id
full_name : text
Now, here is the problem, when using only id and full_name on the database function, it work, but when I had team I get AuthApiError: Database error saving new user.
I find nothing on the web and I have no idea why I can't make it work.
i am using sql developer Version 21.2.1.204 and when i create table by using new table function in IDE , and entered name and select type for each field
after clicking on ok button table is created but fields name are different,
COLUMN2,
COLUMN3,
COLUMN4,
came
i entered column name properly but still this is happening
you can see in images
If the wizard is not working for you, you can write out the DDL statement in a worksheet:
CREATE TABLE table1 (
id VARCHAR2(20),
name VARCHAR2(20),
address VARCHAR2(20),
age VARCHAR2(20) -- Why not use a number?
);
And run it.
As an aside, you probably should use date_of_birth and then calculate the age rather than using an age column that will go out of date as soon as the next person reaches their birthday.
CREATE TABLE table1 (
id VARCHAR2(20),
name VARCHAR2(20),
address VARCHAR2(20),
date_of_birth DATE
);
Blockquote
Organization get id 5 and can create department with org id and get display Department by id org
Blockquote
one of the questions I have to do from school asks me to do the following:
"Create a view called TITLE_UNAVAIL to show the movie titles and media_id of
the media not returned yet. The view should not allow any DML operations. "
This is my script:
CREATE VIEW TITLE_UNAVAIL7
FROM RENTAL_HISTORY7
SELECT title, media_id
WHERE return_date = null
and I get the error saying:
"ORA-00905: missing ketword"
Can someone advise on what I'm doing wrong?
First of all you should read the documentation: CREATE VIEW
CREATE VIEW TITLE_UNAVAIL7 AS
SELECT title, media_id
FROM RENTAL_HISTORY7
WHERE return_date IS null;
This will be the standard answer (as you see form other people). In order to prevent any DML on this view, add WITH READ ONLY, i.e.
CREATE VIEW TITLE_UNAVAIL7 AS
SELECT title, media_id
FROM RENTAL_HISTORY7
WHERE return_date IS null
WITH READ ONLY;
You are not using the right syntax; also, you can not check a column for null values with = null, but you need is null
CREATE VIEW TITLE_UNAVAIL7 AS
SELECT title, media_id
FROM RENTAL_HISTORY7
WHERE return_date is null
I am new to Apex. But I already read through the documentation. But couldn't quite be in the page I wish to look.
So, how do I generate a value from the id in Apex form?
I have a table named customers where it has cust_id and member_id.
Now I want to generate the member_id based on the cust_id when user are to fill in the registration. The cust_id is sequenced.
As for example :
- the user are to be the third,so the cust_id is 3.(this value will not be accessible i guess as the cust_id will be generate after it been saved ).
- and now i want my member_id to have this kind alike value : 20130003 ( 2013 is according to date and 0003 is the cust_id.
Can anyone please show me how to do it.
Note :
- I want to have cust_id and member_id because customer have two type which is member or non-member.so for non-member,member_id will be null
You can use a trigger
create or replace trigger bi_customers
before insert into customers
for each row
begin
select to_number(to_char(sysdate,'YYYY'))*10000+:new.cust_id into :new.member_id from dual;
end;