Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/67.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP strotime不使用while数组_Php_Mysql - Fatal编程技术网

PHP strotime不使用while数组

PHP strotime不使用while数组,php,mysql,Php,Mysql,我有一个关于setlocale和strftime的问题。我有一个疑问: <?php $post_query = "SELECT * FROM posts WHERE post_id AND post_title = 'test' ORDER BY `post_id` DESC "; $pp = mysql_query($post_query); $pps = array(); while($row=mysql_fetch_array($pp)){ $pps[] = $row;

我有一个关于setlocale和strftime的问题。我有一个疑问:

<?php   
$post_query = "SELECT * FROM posts WHERE post_id AND post_title = 'test' ORDER BY `post_id` DESC ";
$pp = mysql_query($post_query);
$pps = array();
while($row=mysql_fetch_array($pp)){
    $pps[] = $row;
}
?>

try
var\u dump($pps)发布时间”不正确。查看数据库表名
post\u time
是否为真。

where条件下的问题`where post\u id=??`没有任何问题。其他细节工作起来像
哦,天哪,你是对的,表名错了。非常感谢。
<?php 
setlocale(LC_TIME, 'tr_TR.UTF-8');  
echo strftime("%d %B %Y ", strtotime($pps[0]['post_time'])); 
?>