Note that there are some explanatory texts on larger screens.

plurals
  1. POSoft delete row not excluding during query
    primarykey
    data
    text
    <p>I am having problem getting my query to exclude my "soft delete" column I have attached my code below any tips on getting this to work? it shows rows that have the <code>deleted</code> = 1 and i need it just to show 0 </p> <pre><code>$query=mysql_real_escape_string($_GET['query']); $query_for_result=mysql_query("SELECT * FROM Assets WHERE `Badge` like '%".$query."%' or `Status` like '%".$query."%' or `First Name` like '%".$query."%' or `Last Name` like '%".$query."%' or `Service Tag` like '%".$query."%' or `Asset Tag` like '%".$query."%' and `deleted` = '0' ")or die(mysql_error()); if(mysql_num_rows($query_for_result1)==0){ } while($data_fetch=mysql_fetch_array($query_for_result)) { echo '&lt;h3&gt;'; echo "&lt;a href=\"modify.php?id=" . $data_fetch['id'] . "\"&gt;" . $data_fetch['First Name'] . ' ' . $data_fetch['Last Name'] . "&lt;/a&gt;"; echo '&lt;br/&gt;&lt;b&gt;Badge:&lt;/b&gt; '. $data_fetch['Badge']; echo '&lt;br/&gt; &lt;b&gt;Service Tag:&lt;/b&gt; '. $data_fetch['Service Tag']; echo ' &lt;b&gt;Asset Tag:&lt;/b&gt; '. $data_fetch['Asset Tag']; echo '&lt;br/&gt; &lt;b&gt;Status:&lt;/b&gt; '. $data_fetch['Status']; echo '&lt;br/&gt;&lt;b&gt;Employee Status: &lt;/b&gt;'; if( $data_fetch['Employee Status'] == 'Active' ){ echo '&lt;font color="#32CD32"&gt;' . $data_fetch['Employee Status'] . '&lt;/font&gt;'; } elseif( $data_fetch['Employee Status'] == 'Terminated' ){ echo '&lt;font color="red"&gt;' . $data_fetch['Employee Status'] . '&lt;/font&gt;';} echo '&lt;br/&gt; &lt;b&gt;Last Modified:&lt;/b&gt; '. $data_fetch['Last Modified']; echo "&lt;span&gt; &lt;/span&gt;"; echo '&lt;/h3&gt;'; echo '&lt;br/&gt;&lt;p&gt;' ; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload