Ask for a read database code and an independent page code & nbsp; I do not understand programming & nbsp; do not give tips or something & nbsp; thank you for your large mysql account 132 & nbsp; password 456 read database name aa & nbsp; table name bb & nbsp; The CC column in the table assumes that the first 500 values of the CC field are read. & nbsp; read 9-character records of 9-Character & nbsp; and displayed on the webpage. if 10 pages are displayed, 10 & nbsp; read the database code.
Ask for an independent page code. I don't know programming. don't give me any tips or something.
Thank you! mysql account 132 password 456 read database name aa table name bb table CC column assuming read CC field first 500 Read value 9 Character record how many 9 characters and displayed if 10 webpages are displayed on the webpage and 10 are not displayed, 0 is displayed.
------ Solution --------------------
@mysql_connect("localhost","123","456");
@mysql_select_db("aa");
mysql_query("set names utf8");
$result=mysql_query("select cc from bb limit 0,500");
while($row=mysql_fetch_array($result)){
$ar[]=$row['cc'];
}
$cnt=count($ar);
for($i=0;$i<$cnt;$i++){
if($ar[$i]==9){
$b[]=$i;
}
}
$cnt_b=count($b);
if($cnt_b>0){
echo $cnt_b;
}else{
echo 0;
}
------ Solution --------------------
$result=mysql_query("select order_state from order limit 500");
$counter=0;
while($row=mysql_fetch_array($result)){
if($row[0]==9) $counter++;
}
echo $counter;