I want to get database column values in some variable. I dont want to use
mysql_fetch_assoc
mysql_fetch_row
mysql_fetch_array
mysql_fetch_object
anyone of this.
My table is:
+----------+-----------+
| ind_type | Index_val |
+----------+-----------+
| pcount | 157 |
| ncount | 210 |
+----------+-----------+
I want to get 157, 210 in some variable $x and $y.
I am working in PHP.
Can some one guide me.?
One can do $p= $mysqli->query('SELECT Index_val FROM view_name where ind_type=pcount'); and then iterate through all rows to fetch all values.
But I have only two rows and for my need I want to manually fetch the values of Index_val. IF someone can sort it out!
select * from view_name where ind_type='pcount';gives me 157. Same thing I wanted in php and store in some variable. Your reputation does not owe this sort of description!mysqli_*as it is outdated (and scheduled for removal in PHP6 I believe).