ive got a table with
i want to echo the usernames who have their "month" as "june" and only the first 20 results should be echoed and please if possible use "for" loop instead of "while"
i got this below code from ansh which is similar to my table
Code:
id|username|password|gender|month|
i got this below code from ansh which is similar to my table
Code:
$get_data_query = @mysql_query("SELECT `id`, `username`,`password`,'gender','month' FROM `mytable` ORDER BY id ASC limit 20;");
while ($get_data_query_result=mysql_fetch_array($get_data_query)){
++$i; print "[b]$i.[/b]Name: $get_data_query_result[1]
month: $get_data_query_result[4]}


Comment