How can I do this if statement?
How can I do this if statement?
misteam
Posts: 50Questions: 18Answers: 0
How can I do this if statement?
From this:
if(source = 'Email',attachments = '',attachments > 0)
In to this:
$q->where( 'is_deleted', '0', '=' );
This discussion has been closed.
Answers
Hi Sir @allan, I hope you could help me. Thanks in advanced
I don't quite understand your question, but do you mean this?:
I don't know where your initialise line of code is from or what source or attachments is. I'd probably need more context to understand your request.
Allan
I'm using if statement sir
if(source = 'Email',attachments = '',attachments > 0)
If (source = 'Email') {
attachments = ''
}else{
attachments > 0
}
I don't really understand what you're trying to do, but I can tell you this:
That's never going to work. You are using an assignment operator where you should have a comparison (==).
... and as Allan said, please can you add more context, rather than just minimal code snippets. Please post all your code with an explanation of what you're trying to achieve,
Colin