PHP SQL query error

前端 未结 6 2207
忘了有多久
忘了有多久 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 08:20

    $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 ";
    

    would work.

    Or if you want to use concatenation :

    $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;
    

提交回复
热议问题