thinkphp problems with SQL queries
such as a table, if you want to query all the values of a single field how to write it, I know if the whole thing is
$m =m (' Table ');
$result = $m->select ();
$this->assign (' res ', $result);
Then the foreground uses volist to loop out the value of the $res.
Well, if I just want to query all the values of the Name field under table, there's nothing on the manual, and there's nothing to find.
Another problem is that if you use statistical query results how to assign value to the foreground display, such as with $m->count (); Get the number of this table, with dump printed out on a value, do not know how to use what is displayed in the foreground.
------Solution--------------------
Reference:
$m =m (' Table ');
$result = $m->field (' name ')->select ();
$this->assign (' res ', $result);
I'm doing thinkphp now, too.