I have the following queries that work perfectly in MySql:
SELECT * FROM rapoarte WHERE nrtel LIKE '0256%' OR nrtel LIKE '0356%
SELECT * FROM rapoarte WHERE nrtel NOT LIKE '07%' AND nrtel NOT LIKE '0256%' AND nrtel NOT LIKE '0356%'
SELECT * FROM rapoarte WHERE nrtel LIKE '07%'
in PHP they will result the following:
results just for LIKE '0256%'
no results
inclomplete results. i have phone numbers that start with 076, 075 and it only shows the numbers that start with 076.
Anyone know why?
thanks, Sebastian
EDIT
here is the code:
$select_int= mysql_query("SELECT * FROM rapoarte WHERE nrtel LIKE '0256%' OR nrtel LIKE '0356%'");
$local = mysql_fetch_array($select_int);
echo "<table align='center' border='0' width='600'><tr><td><b>Ziua</b></td><td><b>Ora</b></td><td><b>Trunchi</b></td><td><b>interior</b></td><td><b>Durata</b></td><td><b>Numar Format</b></td></tr>";
while($int = mysql_fetch_array($select_int)) {
echo "<tr>
<td>".$local['ziua']."</td>
<td>".$local['ora']."</td>
<td>".$local['linie']."</td>
<td>".$local['interior']."</td>
<td>".$local['durata2']."</td>
<td>".$local['nrtel']."</td></tr>";
}
echo "</table>";