我想插入从 JSON 推文读取的数据库中,而不是特定用户。
谢谢!
$id_str = $row->id_str;
$from_user = $row->user->screen_name;
$from_user_id = $row->user->id;
$from_img = $row->user->profile_image_url;
$text = $row->text;
$fecha = $row->created_at;
$aux = 'CUSTOM FROM USER ID';
$query2 = "INSERT IGNORE INTO
twts (
from_name,
from_id,
twt_id,
twt_text,
twt_user_img,
twt_keyword,
twt_date)
VALUES (
'$from_user',
'$from_user_id',
'$id_str',
'".mysql_real_escape_string($text)."',
'".$from_img."',
'".mysql_real_escape_string($kw['twt_keyword'])."',
'$fecha'
WHERE $aux == 'CUSTOM FROM USER ID')";
$reply2 = mysql_query($query2) or die("[ ".date('Y-m-d h:i:s')." ] Error MySQL ".mysql_error()." \n");
来自用户 ID 的自定义