if($con){
mysql_query('use yatibang');
mysql_query('set names utf8');
}else{
echo "数据连接失败";
}
$sql = "desc app_category";
$res = mysql_query($sql);
$row = $rows = array();
while( $row = mysql_fetch_assoc($res)){
$rows[] = $row['Field'];
}
var_dump($rows);
返回结果如下:
sql="SELECT FROM YY ORDER BY id DESC"set rs=serverCreateObject("adodbrecordset")
rsopen sql,conn,1,1
do while not rseof
responseWrite rs("name")&"<br>"
else
end if
rsmovenext
loopcreate PROCEDURE dboSouceFeildByTable
@souceFeildTable nvarchar(100)
AS
begin
declare @SQL nvarchar(max)
select @SQL='select from '+@souceFeildTable
exec(@SQL)
end可以尝试以下代码:
javautilDate dt = new javautilDate();
javatextSimpleDateFormat sdf =
new javatextSimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String currentTime = sdfformat(dt);
然后把currentTime 插入数据库的datetime字段就可以了,取的时候也一样,取出来的
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)