How to extract specified field data from mysql data table in php
PHP中文网
PHP中文网 2017-05-16 13:10:22
0
1
471
 $result = mysql_query("select * from brand order by yesterday_str");
                while($row = mysql_fetch_array($result))
                  {
                  echo "'".$row['yesterday_str']."'";
                  echo ",";
                  }

Now I can extract all field data in the brand table through the above method

There are 7 fields in the brand table: a, b, c, d, e, f, g.
How can I modify it to extract only the data of the 5 fields abcfg?

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(1)
左手右手慢动作
 $result = mysql_query("select a,b,c,f,g from brand order by yesterday_str");
                while($row = mysql_fetch_array($result))
                  {
                  echo "'".$row['yesterday_str']."'";
                  echo ",";
                  }
                  
                  //这样就好了吧????
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template