join
in
如果在框架中要显示查找出来的内容,可能需要调用模板,
如果没用模板那么就简单了,如果没有搜索条件的话直接echo就可以,有条件就加上where
$connection=mysql_connect
("localhost","root","123")
mysql_select_db("test",$connection)
$result=mysql_query("select
*
from
test")
$num_results=
mysql_num_fields($result)
echo
'<p>Number
of
books
found:
'.$num_results.'</p>'
while($row
=
mysql_fetch_assoc($result))
{
echo
'<hr/>
链接来源|
广告媒介|
|活动'
echo
'<hr/>'.$row['Utm_source'].$row['Utm_medium'].$row['Utm_campaign']
}
mysql_close($connection)
啊,明白了,我图方便就简写了,没按照规范,你就自己规范写吧$cnt = select count(`id`) as `num` from `tablename` //这是取得数据库内的数据数量
$datas = select `id`, `picname`,`picpath` from `tablename`
两种啊,第一种
foreach ( $datas as $data )
{
$del = "delete from `tablename` where `id`={$data['id']}"
@unlike( "{$data['picpath']}" )//这里取决于你存的是相对还是绝对路径
echo("名称:$data['picname']")//显示文件名称
echo("
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)