Calling a specific row in Sql when ever i like
Posted: Thu May 10, 2012 9:00 am
How can i call a specific row when ever a like.
example :
0 = value 1st row in the database/table_name
1 = value 2nd row in the database/table_name
2 = value 3rd row in the database/table_name
......
....
......
.....
etc.
is there a code i can do except from using sql_fetch_array then loop and put in into a multidimensional array?
example :
Code: Select all
$record = mysql_query("select * from table_name");
($getValue= mysql_fetch_row($record) //i'm not sure what should i use. should i use mysql_fetch_array, mysql_ fetch_ assoc, mysql_ fetch_ object, mysql_ field_ name and etc.
print $getValue[$column_name][0];
1 = value 2nd row in the database/table_name
2 = value 3rd row in the database/table_name
......
....
......
.....
etc.
is there a code i can do except from using sql_fetch_array then loop and put in into a multidimensional array?