How do I get an answer from a database?

nycdude

Пользователь
Регистрация
06.05.2018
Сообщения
57
Благодарностей
1
Баллы
8
Hello all,

I've been INSERTing into databases with no problem but now I want to up my game and know how to get an answer from the same session (guessing terms) so that I can process more INSERTs into custom fields.

My situation: I am posting into WP directly into mysql end using the database action block, but now I also want to add post meta into the custom fields. I've been doing the research and I'm guessing I have to make the post first, then bring back the ID so that I can add the custom field info into that same post.

My question is, how can I get the post ID back so that I can do another INSERT into that post's CFs? AND ... two-parter here ... is there a way I can do all that in one shot?

Can I INSERT a newly published post, THEN bring back the ID, THEN INSERT the custom fields all in one shot?

Thanks for your time.



To add: those parameters in request aren't being used at this moment.
 
Последнее редактирование:

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)