0

Looking at the first condition //if ($_REQUEST["string"]<>''). What does <> this symbol mean? This is my first time to see one of this. Could someone explain what it is.. Thanks in advance

<?php
if ($_REQUEST["string"]<>'') {
    $search_string = " AND (full_name LIKE '%".mysql_real_escape_string($_REQUEST["string"])."%' OR email LIKE '%".mysql_real_escape_string($_REQUEST["string"])."%')"; 
}
if ($_REQUEST["city"]<>'') {
    $search_city = " AND city='".mysql_real_escape_string($_REQUEST["city"])."'";   
}

if ($_REQUEST["from"]<>'' and $_REQUEST["to"]<>'') {
    $sql = "SELECT * FROM ".$SETTINGS["data_table"]." WHERE from_date >= '".mysql_real_escape_string($_REQUEST["from"])."' AND to_date <= '".mysql_real_escape_string($_REQUEST["to"])."'".$search_string.$search_city;
} else if ($_REQUEST["from"]<>'') {
    $sql = "SELECT * FROM ".$SETTINGS["data_table"]." WHERE from_date >= '".mysql_real_escape_string($_REQUEST["from"])."'".$search_string.$search_city;
} else if ($_REQUEST["to"]<>'') {
    $sql = "SELECT * FROM ".$SETTINGS["data_table"]." WHERE to_date <= '".mysql_real_escape_string($_REQUEST["to"])."'".$search_string.$search_city;
} else {
    $sql = "SELECT * FROM ".$SETTINGS["data_table"]." WHERE id>0".$search_string.$search_city;
}

$sql_result = mysql_query ($sql, $connection ) or die ('request "Could not execute SQL query" '.$sql);
if (mysql_num_rows($sql_result)>0) {
    while ($row = mysql_fetch_assoc($sql_result)) {
?>
soyan
  • 59
  • 5

2 Answers2

0

If you have google it once you'll probably get the answer comparatively then over SO

It stands for NOT EQUAL

and same as that of !=

Narendrasingh Sisodia
  • 21,247
  • 6
  • 47
  • 54
0

It's not equal to

Its the same as:

if($a != $b){}

http://php.net/manual/en/language.operators.comparison.php

Samuel Cook
  • 16,620
  • 7
  • 50
  • 62