急求解```!!进!!!! $e和$ee只是查出结果集.$result = mysql_query('select count(*) from vote');$row = mysql_fetch_row($result);echo $row[0];这咱写法才是正确的. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我在页面上从数据库里边取出来了一个时间类型 2006-09-15 16:14:14 我要转成年-月-日 显示在PHP页面上怎么办啊!!!----------------------------------------------------echo substr('2006-09-15 16:14:14', 0, 10); 多少行 mysql_num_rows总和 要将结果集赋值 $e = mysql_query("select count(*) from vote"); $count = mysql_num_rows($e);echo $count;$ee = mysql_query("select sum(voteValue) as totalnum from vote");$sum = mysql_fetch_array($ee);echo $sum['totalnum']; 我在页面上从数据库里边取出来了一个时间类型 2006-09-15 16:14:14 我要转成年-月-日 显示在PHP页面上怎么办啊!!!echo date('Y-m-d',strtotime('2006-09-15 16:14:14')); $e和$ee是个记录集。所以不能直接打印他!include ("common/connect.ini");$e=mysql_query("select * as totle from vote");$num_rows = mysql_num_rows($e); //这个函数的作用是返回记录集中行的数量,所以上面就不用count(*)了。$ee=mysql_query("select sum(voteValue) as totalnum from vote"); $data = mysql_fetch_object($ee);echo "一共".$num_rows."行。";echo "voteValue字段的和为: ".$data->totalnum;用strtotime函数把你的2006-09-15 16:14:14时间转化为秒,再用date函数格式化输出就可以了。date('Y-m-d',strtotime('2006-09-15 16:14:14')); PHP的ORM问题! 已经初始化类,还是提示Call to a member function query 一道编程题 ZDE提示 $_SERVER['SERVER_NAME'] Undefined index 错误,但是在浏览器中又没有 新手 问个 关于 php html式样问题 马上给分 !!! php设置问题 关于php和smarty的问题,救命啊~~~~ 关于信息发布(内外网同步) 正确的注册session变量应该怎么写 discuz做企业站行吗? 投票中这样的值怎么取 lifeType 的多用户版乱码问题!
echo substr('2006-09-15 16:14:14', 0, 10);
总和 要将结果集赋值
$e = mysql_query("select count(*) from vote");
$count = mysql_num_rows($e);
echo $count;$ee = mysql_query("select sum(voteValue) as totalnum from vote");
$sum = mysql_fetch_array($ee);
echo $sum['totalnum'];
$e=mysql_query("select * as totle from vote");
$num_rows = mysql_num_rows($e); //这个函数的作用是返回记录集中行的数量,所以上面就不用count(*)了。$ee=mysql_query("select sum(voteValue) as totalnum from vote");
$data = mysql_fetch_object($ee);echo "一共".$num_rows."行。";
echo "voteValue字段的和为: ".$data->totalnum;
用strtotime函数把你的2006-09-15 16:14:14时间转化为秒,再用date函数格式化输出就可以了。
date('Y-m-d',strtotime('2006-09-15 16:14:14'));