THINKPHPsql query problems such as a table. if you want to query all the values of a single field, how can I write it?
$ M = M ('table'); $ result = $ m-> select (); $ this-> assign ('res', $ result );
// Then the foreground uses volist to loop out the $ res value.
If I only want to query all the values of the name field in the table, how can I write them? I didn't find them in the manual.
Another problem is how to assign a value to the front-end display of the statistical query results. for example, you can use $ m-> count () to get the number of tables, dump is used to print out a value. I don't know how to use it to display it at the front end.
Reply to discussion (solution)
$ M = M ('table'); $ result = $ m-> field ('name')-> select (); $ this-> assign ('res ', $ result );
$ M = M ('table'); $ result = $ m-> field ('name')-> select (); $ this-> assign ('res ', $ result );
As it turns out, I am also working on ThinkPHP
There was no such manual, but I did not find it after I searched it.
You didn't take a look.
Http://doc.thinkphp1.cn/manual/query.html