PHP SQL query error

前端 未结 6 2032
忘了有多久
忘了有多久 2021-01-26 07:26

I have some problem with type conversation in this code (working with Facebook PHP SDK 3.0.1):

$page_id = 192485754113829;
$post_limit = 2;

$query = \"select po         


        
6条回答
  •  北荒
    北荒 (楼主)
    2021-01-26 07:53

    It has nothing to do with type-conversion, it's just your quotes that are wrong. The code should look like this:

    $page_id = 192485754113829;
    $post_limit = 2;
    
    $query = "select post_id, source_id, actor_id, target_id, created_time, likes, message, attachment, comments from stream where source_id = ".$page_id." LIMIT ".$post_limit."";
    

提交回复
热议问题