PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
i have a table and 2 columns in it what i want's to do is that fetch the info that is in both columns one column name is 'title' and other's name is 'info' against each title it contains some info and i just know the name of 2 coumns . Now i had to fetch all the titles from table along with the coross-ponding info.
<?php
$res = mysql_query($query) or die(mysql_error);
$norow = mysql_num_rows($res);
?>
using the above code i can get the #of effected records but how can i fetch all the record from the column.
i mean how can i will be able to featch all the titles. ?
The mysql_fetch_assoc() function fetches an associative array. If you want only that, use that function, if you want indices, use the mysql_fetch_row() function. If for some reason you need both, then you should use the mysql_fetch_array() function; do not assign what you will not use.