Hi guys i have an error in my previos database. This is the bible database :
This is my data
I want to populate versiculo + texto from each capitulo that is in each id_libro.
Explanation:
Until now I been populated the two main books of the bible ---> Old Testament and New Testament
if I click on the Old testament, it will show all the books on it, Genesis..etc...
then I click on Genesis and populate all the 50 chapters on it, Chapter 1, 2, 3..... 50.
then if I click on Chapter 1 of Genesis I want to populate the vers and the text contain on that respective Chapter. However I populate all the vers and text of all chapters on Genesis book when I click Chapter 1, instead of only 31 vers that contain chapter 1 of Genesis.
See the Picture below:
it continues.......
I using the following query:
<?php
$id_libro = $_GET['cat'];
$query="SELECT versiculo,texto from rv1960 where id_libro =$id_libro ";
$result=mysql_query($query);
while($row=mysql_fetch_array($result,MYSQL_ASSOC))
{
$versiculo =$row['versiculo'];
$texto =$row['texto'];
echo "<h3>$versiculo -- $texto</h3><br>";
echo"<p>";
}
?>
Can you guys please help me ... this is the first time I using SQL. Thanks