跪求一个PHP中写俩查询语句的方法
我现在写了两个SQL表的查询语句:第一个:<?phpsession_start();include'dj_admin_sqlsetting.php';@mysql_con...
我现在写了两个SQL表的查询语句:
第一个:
<?php
session_start();
include 'dj_admin_sqlsetting.php';
@mysql_connect($db_host,$db_user,$db_password)
or die("03");
@mysql_select_db($db_name)
or die("04");
$picturesCX = "select * from pictures order by userid desc limit"
$picturesjieguo = mysql_query($picturerCX);
if($pictureszhixing = mysql_fetch_array($picturesjieguo))
{
$picturesjson = json_encode($pictureszhixing);
echo $picturesjson;
}
else
{
die ("07")
}
?>
第二个:
<?php
session_start();
include 'dj_admin_sqlsetting.php';
@mysql_connect($db_host,$db_user,$db_password)
or die("03");
@mysql_select_db($db_name)
or die("04");
$albumCX = "select * from album order by id desc limit";
$albumjieguo = mysql_query($albumCX);
if($albumzhixing = mysql_fetch_array($albumjieguo))
{
$albumjson = json_encode($albumzhixing);
echo $albumjson;
}
else
{
die("07");
}
?>
怎么写一起?教程给我整迷糊了 展开
第一个:
<?php
session_start();
include 'dj_admin_sqlsetting.php';
@mysql_connect($db_host,$db_user,$db_password)
or die("03");
@mysql_select_db($db_name)
or die("04");
$picturesCX = "select * from pictures order by userid desc limit"
$picturesjieguo = mysql_query($picturerCX);
if($pictureszhixing = mysql_fetch_array($picturesjieguo))
{
$picturesjson = json_encode($pictureszhixing);
echo $picturesjson;
}
else
{
die ("07")
}
?>
第二个:
<?php
session_start();
include 'dj_admin_sqlsetting.php';
@mysql_connect($db_host,$db_user,$db_password)
or die("03");
@mysql_select_db($db_name)
or die("04");
$albumCX = "select * from album order by id desc limit";
$albumjieguo = mysql_query($albumCX);
if($albumzhixing = mysql_fetch_array($albumjieguo))
{
$albumjson = json_encode($albumzhixing);
echo $albumjson;
}
else
{
die("07");
}
?>
怎么写一起?教程给我整迷糊了 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询