dqk77945 2017-01-05 15:31
浏览 51

查询后打印滑块图像

Using following query in my database:

SELECT id_slider,id_multimedia,path_m FROM slider JOIN slider_immagini ON slider.id = id_slider JOIN multimedia ON id_multimedia = multimedia.id WHERE slider.id_utente = ='" . $user_landing . "' ORDER BY data_creazione ASC

I have created following table using result data :

<table>
<tr>
   <th>id_slider</th> <th>id_multimedia</th>  <th>path_m</th> 
</tr>
 <tr><td>3 </td>         <td>2</td>    <td>cartello1482507814.jpg</td> </tr>
 <tr><td>3</td>      <td>3</td>    <td>0open1482511822.jpg</td>        </tr>
 <tr><td>3</td>      <td>4</td>    <td>gioco barabba.jpg</td>          </tr>
 <tr><td>4</td>      <td>2</td>    <td>cartello1482507814.jpg</td>     </tr>
 <tr><td>4</td>      <td>3</td>    <td>0open1482511822.jpg </td>       </tr>
</table>

the result get two slider whith image's path.

how can I print the two slider correctly with php?

the slider has to be done so

<div id="myCarousel" class="carousel slide" data-ride="carousel">
                <!-- Indicators -->
                <ol class="carousel-indicators">
                    <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
                    <li data-target="#myCarousel" data-slide-to="1"></li>
                    <li data-target="#myCarousel" data-slide-to="2"></li>
                    <li data-target="#myCarousel" data-slide-to="3"></li>
                </ol>

                <!-- Wrapper for slides -->
                <div class="carousel-inner" role="listbox">

                    <div class="item active">
                        <img src="https://www.repstatic.it/content/nazionale/img/2015/11/26/121631321-63ff8328-4925-4ee2-9ff5-a81974b7074e.jpg" alt="Chania" width="460" height="345">
                        <div class="carousel-caption">


                        </div>
                    </div>

                    <div class="item">
                        <img src="https://www.repstatic.it/content/nazionale/img/2015/11/26/121631321-63ff8328-4925-4ee2-9ff5-a81974b7074e.jpg" alt="Chania" width="460" height="345">
                        <div class="carousel-caption">

                        </div>
                    </div>

                    <div class="item">
                        <img src="https://www.repstatic.it/content/nazionale/img/2015/11/26/121631321-63ff8328-4925-4ee2-9ff5-a81974b7074e.jpg" alt="Flower" width="460" height="345">
                        <div class="carousel-caption">

                        </div>
                    </div>

                    <div class="item">
                        <img src="https://www.repstatic.it/content/nazionale/img/2015/11/26/121631321-63ff8328-4925-4ee2-9ff5-a81974b7074e.jpg" alt="Flower" width="460" height="345">
                        <div class="carousel-caption">

                        </div>
                    </div>

                </div>

                <!-- Left and right controls -->
                <a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
                    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
                    <span class="sr-only">Previous</span>
                </a>
                <a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
                    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
                    <span class="sr-only">Next</span>
                </a>
            </div>

</div>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 对于相关问题的求解与代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料
    • ¥15 使用R语言marginaleffects包进行边际效应图绘制
    • ¥20 usb设备兼容性问题
    • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
    • ¥15 安装svn网络有问题怎么办