How to get a value from a table using functions and return count

How to get a value from a table using functions and return count: Write a simple query and pass the parameters: function somename($tablename, $colnam, $colvalue, $mode, $returncolnam) { Select $returncolnam from $tablenam where $colnam=$colval } Note: For $returncolnam you can also use array number starting from 0.

SQL Basic Queries

Basically FOUR SQL commands used very often. These four commands are SELECT, INSERT, UPDATE, DELETE By using these four basic commands you can do a lot of queries. SELECT select * from tablename INSERT insert into tablename SET col1=”, col2=” UPDATE update tablename SET col1=”, col2=” WHERE col3=” DELETE delete from tablename WHERE col1=”