On Fri, Nov 19, 2021 at 9:05 AM Billy Zheng <[email protected]> wrote:

> Okay, i update my code, like this:
>
> ```
>   r.is 'add-ts-keyword' do
>         new_keyword = r.params['new_keyword']
>
>         if new_keyword.present?
>           DB.run(Sequel.lit("INSERT INTO zhparser.zhprs_custom_word
> values(?) ON CONFLICT DO NOTHING;", new_keyword))
>         end
>
>         r.redirect request.referrer
>       end
>
>       r.is 'remove-ts-keyword' do
>         keyword = r.params['keyword']
>
>         if keyword.present?
>           DB.run(Sequel.lit("DELETE FROM zhparser.zhprs_custom_word WHERE
> word=?;", keyword))
>         end
>
>         r.redirect request.referrer
>       end
>
>       r.is 'sync-ts-keyword' do
>         DB.run("SELECT sync_zhprs_custom_word();")
>         DB.run("UPDATE investing_latest_news SET title = title, preview =
> preview;")
>         r.redirect request.referrer
>       end
> ```
>
> But it still not work.
>
> For describe my issue, i record a video, and upload here.
>
> https://raw.githubusercontent.com/zw963/zw963.github.io/master/files/1.mp4
>
> Could you please check?
>
>
> > UPDATE just sets columns to their current value, so it will only have an
> effect if there are triggers or something similar in play.
>
> As you can see in the video, the first time, i add "įžŽå…ƒâ€œ token into parser,
> the UPDATE statement works, but then after i remove add from parser,
> the UPDATE not work anymore,  and finally, when i UPDATE from bin/console,
> it works again.
>

Sorry, I don't have time to watch vidoes.  This is a Sequel help form, so
if you think there is a problem, please post a minimal self contained
example showing it using just Sequel, with no other libraries.

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/CADGZSScuKayUiDdM9N120EymGRgOos%2B5fidKrsm8zCf4KVY%3DSQ%40mail.gmail.com.

Reply via email to