Page 1 of 1

Where Clause NOT Working `Create_User` = `Mark`

Posted: 2021-08-24 20:22
by mohamed
Hello,

I have tried this WHERE Clause in the Event `Create_User` = `Mark`
to show only events created by the user `Mark` BUT when I save it, no events displayed on the calendar !!

Any clue :|

Re: Where Clause NOT Working `Create_User` = `Mark`

Posted: 2021-08-25 07:16
by D Oliveira
you can try changing the quotes for " or ` or '

hope it helps

Re: Where Clause NOT Working `Create_User` = `Mark`

Posted: 2021-08-25 11:31
by mohamed
D Oliveira

Thanks but it did not help - I have tried all but still the same

Re: Where Clause NOT Working `Create_User` = `Mark`

Posted: 2021-08-27 14:59
by onoehring
Hi,

try

Code: Select all

WHERE `Create_User`= 'Mark'
(first quotes leaning left,
quotes around Mark are not leaning)

Does it work?

Olaf

Re: Where Clause NOT Working `Create_User` = `Mark`

Posted: 2021-08-28 11:10
by mohamed
Actually, I have found the cause of the problem, that I was missing the Table Name and Field Name:

`TableName`.`Create_User`= 'Mark'

that I must add the Table Name.

Re: Where Clause NOT Working `Create_User` = `Mark`

Posted: 2021-08-29 07:59
by onoehring
Hi,

well, you should probably have provided the full SQL statement in the first place: If you pull data from only one table, you do not need to have the tablename in the WHERE clause. So next time ... :-)

Olaf

Re: Where Clause NOT Working `Create_User` = `Mark`

Posted: 2021-08-29 15:54
by mohamed
Hi,
Thanks ..

No, I did not use full SQL statement and I have a single table in this database! :!:

Re: Where Clause NOT Working `Create_User` = `Mark`

Posted: 2021-08-30 06:27
by onoehring
Hi,

if you have only one table, SQL does not need the name of the table to work.
I did suggest different quotaion marks - maybe this made it work? Do you mind testing - just for my own peace of mind ;-) Thanks

Olaf

Re: Where Clause NOT Working `Create_User` = `Mark`

Posted: 2021-08-30 20:02
by mohamed
Hi,

Sure, I did the test...

it worked fine as you suggested but without using or adding the WHERE clause WHERE `Create_User`= 'Mark'
I mean it should be entered this:
`Create_User`= 'Mark'

You are the man 8-)

Re: Where Clause NOT Working `Create_User` = `Mark`

Posted: 2021-09-01 07:52
by onoehring
Hi Mohamed,

my pleasure.
Thank you for testing and reporting back.

Olaf