On Wednesday April 1 2015 11:12, in comp.lang.php, "Erwin Moller"
<
erwinmol...@xs4all.nl> wrote:
> On 4/1/2015 4:19 AM, richard wrote:
>>
>>
>> $yr=1960;
>>
>> while ($yr<'1970'){
>> echo "<table border='1'>";
>> echo "<tr><th colspan='10'>$yr</th></tr>";
>>
>> if ($result = mysqli_query($link,"SELECT * from sixty
>> where peak='1' and year=$yr
>> ORDER BY sid "))
>> {
[snip]
> Consider using the query:
> "SELECT * from sixty where (
> (peak='1')
> AND
> (year>1960)
> AND
> (year<1970)
> )ORDER BY year, sid "
If I understand richard's design correctly (from prior postings regarding
the mroldies website and php/mysql coding), this suggestion won't give him
much of a boost. You see, the table 'sixty' (IIRC) only contains rows with
a year between 1960 and 1969 inclusive. Your (year>1960) AND (year<1970)
will (in this case) be true for every row in the 'sixty' table.
--
Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request