Jump to content

williamh26

Members
  • Posts

    32
  • Joined

  • Last visited

Everything posted by williamh26

  1. <?php $id_libro = $_GET['cat']; $query="SELECT versiculo,texto,capitulo from rv1960 where id_libro =$id_libro and capitulo= $capitulo"; $result=mysql_query($query); while($row=mysql_fetch_array($result,MYSQL_ASSOC)) { $versiculo =$row['versiculo']; $capitulo =$row['capitulo']; $texto =$row['texto']; echo "<h3>$versiculo -- $texto</h3><br>"; echo"<p>"; } ?>
  2. i delete $capitulo $Get_['cat']; and it give me the following error Undefined variable: capitulo in C:\wamp\www\Iglesia viviente\includes\escritura.inc.php on line 12 Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\Iglesia viviente\includes\escritura.inc.php on line 15
  3. I put i little video in you tube this is the link
  4. Hi.. thank you very much I tryed but i gets the following patern: Capitulo 1 of Genesis (which is fine), however when click in Capitulo 2 (chapter 2 genesis) it jumps to Chapter 2 of Exodus (capitulo dos Exodo) instead of Genesis Chapter 2. <?php $capitulo = $_GET['cat']; $id_libro = $_GET['cat']; $query="SELECT versiculo,texto,capitulo from rv1960 where id_libro =$id_libro and capitulo = $capitulo "; $result=mysql_query($query); while($row=mysql_fetch_array($result,MYSQL_ASSOC)) { $versiculo =$row['versiculo']; $capitulo =$row['capitulo']; $texto =$row['texto']; echo "<h3>$versiculo -- $texto</h3><br>"; echo"<p>"; } ?>
  5. 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
  6. Hi guys I have the following tables: table: capitulo capitulo_id autoincrement libro_id capitulo table: rv1960 id versiculo texto I have the following code in which i want to populate all the versiculo(vers) and texto from each capitulo(chapter) what i acomplish is populate the vers from all chapters , i just show all vers from each chapter. this is the query i use <?php //variable $versiculo = $_GET['cat']; $query="SELECT versiculo, texto from rv1960 where id = $versiculo"; $result=mysql_query($query); if(mysql_num_rows($result)>0){ echo"<table border='0' align='center' cellpadding='2' cellspacing='2' width='100%'>"; while($row=mysql_fetch_array($result,MYSQL_ASSOC)){ $versiculo = $row['versiculo']; $texto = $row['texto']; echo "<tr>"; echo "<td VALIGN='TOP'><font size='2' color='#FFFFFF' face='Verdana' color='red'>$versiculo</font></td>"; echo"<td VALIGN='TOP'><font size='2' face='Verdana' color='#FFFFFF'>$texto</font></td>"; echo "</tr>"; } echo"</table>"; } ?> can help me pleases thanks
  7. Hi guys i would like to play a mp3 files from my dadabase using jw. this is my table [b]table: audio player[/b] genero_id int(10) AUTO_INCREMENT name varchar(255) [b]table: canciones[/b] cancion_id int(10) AUTO_INCREMENT genero_id int(10) autor varchar(255) titulo_cancion varchar(255) audio varchar(255) I polulate each genre with the following code: <?php mysql_connect("localhost", "audioplayer", "audioplayer") or die(mysql_error()); mysql_select_db("audioplayer") or die(mysql_error()); $limit=3; $count=0; echo"<table border='0' align='center' cellpadding='2' cellspacing='2' width='100%'>"; $query="SELECT genero_id, name from audioplayer"; $result=mysql_query($query); while($row=mysql_fetch_array($result,MYSQL_ASSOC)) { $genero_id = $row['genero_id']; $name = $row['name']; if ($count < $limit) { if($count ==0) { echo"<tr>"; } echo"<td align='center' VALIGN='TOP'><font size='1.2' face='Verdana'><a href=\"index.php?content=cancion&cat=$genero_id\">$name</a></font><br><br></td>"; }else { // $count=0; // echo"</tr><tr VALIGN='TOP'><td align='center'><font size='1.2' face='Verdana'><a href=\"index.php?content=cancion&cat=$genero_id\">$name</a></font><br></td>"; } $count++; } echo"</tr></table>"; ?> Then i would like to get the audio player songs contain in each with this code <HTML> <HEAD> <TITLE>New Document</TITLE> <script type="text/javascript" src="js/audio-player.js"></script> <script type="text/javascript"> AudioPlayer.setup("http://localhost/audioplayer/js/player.swf", { width: 290 }); </script> </HEAD> <BODY> <?php $genero_id = $_GET['cat']; $query = "Select count(cancion_id) from canciones where genero_id = $genero_id"; $result = mysql_query($query); $row = mysql_fetch_array($result); if ($row[0] == 0) { echo "<h2 align='center'><br>Lo Sentimos no hay canciones en este momento</h2>\n"; } else { $sql = mysql_query("SELECT * from canciones WHERE genero_id=$genero_id"); //variable $limit=1; $count=0; echo"<table class='pretty-table' border='0' align='center' cellpadding='2' cellspacing='2' width='90%'>"; while($row = mysql_fetch_array($sql)){ $genero_id = $row['genero_id']; $autor = $row['autor']; $titulo_cancion = $row['titulo_cancion']; $audio = $row['audio']; if ($count < $limit) { if($count ==0) { echo"<tr>"; } //<img src='images/index_27.gif' width='16' height='17' alt='' /> echo"<p id='audioplayer_$cancion_id'>$titulo_cancion</p>"; echo"<script type='text/javascript'>"; AudioPlayer.embed('audioplayer_$cancion_id', {soundFile: 'http://localhost/audioplayer/canciones/$audio.mp3'}); echo"</script>"; echo"<br>"; }else { // $count=0; // echo"<p id='audioplayer_$cancion_id'>$titulo_cancion</p>"; echo"<script type='text/javascript'>"; AudioPlayer.embed('audioplayer_$cancion_id', {soundFile: 'http://localhost/audioplayer/canciones/$audio.mp3'}); echo"</script>"; echo"<br>"; } $count++; } echo"</tr></table>"; } ?> </BODY> </HTML> But i have this error... can help me please Parse error: syntax error, unexpected '{' in C:\wamp\www\audioplayer\cancion.inc.php on line 53 Call Stack # Time Memory Function Location 1 0.0006 367848 {main}( ) ..\index.php:0 Thank you very much in advanced
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.