About 3,230,000 results
Open links in new tab
  1. PHP if Statements - W3Schools

    You can use conditional statements in your code to do this. In PHP we have the following conditional statements: if statement - executes some code if one condition is true; if...else …

  2. PHP create MySQL query with conditions if/elseif/else

    I've confirmed that the query line itself works in MySQL but I would need to somehow get it inside the MySQL_query($con, The query here). So how do I get the php output of whole if/elseif …

  3. mysql - PHP if statement in SQL query - Stack Overflow

    Jan 30, 2012 · So I am trying to involve an if statement in my SQL query in my PHP code. Basically, I want to say "if $var is not 0, add the WHERE clause, but if $var is 0, don't add it". …

  4. Using AND/OR in if else PHP statement - Stack Overflow

    Dec 10, 2010 · How do you use 'AND/OR' in an if else PHP statement? Would it be: 1) AND. if ($status = 'clear' AND $pRent == 0) { mysql_query("UPDATE rent SET dNo = '$id', status = …

  5. IF, IF-THEN, IF-THEN-ELSE and IF-THEN-ELSEIF-ELSE Statement

    Aug 21, 2024 · MySQL IF-THEN-ELSE Statement: When the condition checks to be TRUE, the statements between IF-THEN and ELSE execute. On the other hand, the statements (else …

  6. PHP: elseif/else if - Manual

    elseif/else if (PHP 4, PHP 5, PHP 7, PHP 8) elseif, as its name suggests, is a combination of if and else. Like else, it extends an if statement to execute a different statement in case the …

  7. PHP If…Else Statements - Tutorial Republic

    In this tutorial you will learn how to use PHP if, if-else, and if-elseif-else statements to execute different operations based on the different conditions.

  8. If statements - The complete PHP tutorial

    The else statement is the if statements best friend - it's the alternative to a failed if statement. In code, it can look a bit like this: <?php $animal = "Cat"; if($animal == "Dog") echo "It's a dog!"; …

  9. PHP If Else Statement - Online Tutorials Library

    If you want to execute some code if a condition is true and another code if the sme condition is false, then use the "if....else" statement. Syntax. The usage and syntax of the if statement in …

  10. mysql - check a SQL query with if / else in PHP - Stack Overflow

    Sep 29, 2013 · $mysqli = new mysqli('localhost', 'root', 'root', 'cursuson'); $result = $mysqli->query("SELECT * FROM cursus01"); $count = $query->num_rows; if($count <= 10){ //Less …

  11. Some results have been removed