Find Jobs
Hire Freelancers

Write a mysql query to update a single database entry

$10-30 USD

Завершено
Опублікований over 7 years ago

$10-30 USD

Оплачується при отриманні
I am running a function to update the status of a custom post type to 'pending' when the user role is changed to 'subscriber'. At the same time I need to update an entry in the database to correspond. The table to update is from the Events Manager plugin. (See the attached image) We need to set the DB table cell value to 0 to match the post update. (0 is pending, 1 is published, -1 is trash) Here's the function: //We need to set events that were published by expired users to 'pending' add_action( 'set_user_role', 'draft_demoted_user_events', 10, 2 ); function draft_demoted_user_events( $demoted_author_id, $role ) { if( ('subscriber' == $role) || ('s2member_level0' == $role) && 'publish' == get_post_status( $p->ID) ) { $args = array( 'numberposts' => -1, 'author' => $demoted_author_id, 'post_type' => 'event', ); $demoted_author_posts = get_posts( $args ); foreach( $demoted_author_posts as $p ) { $my_post = array( 'ID' => $p->ID, 'post_status' => 'pending', ); wp_update_post( $my_post ); //Now do the database table update //UPDATE `database_name`.`wp_em_events` SET `event_status` = '0' WHERE `wp_em_events`.`event_id` = ID; } } }
ID проекту: 11538830

Про проект

23 пропозицій(-ї)
Дистанційний проект
Активність 8 yrs ago

Хочете заробити?

Переваги подання заявок на Freelancer

Вкажіть свій бюджет та терміни
Отримайте гроші за свою роботу
Опишіть свою пропозицію
Реєстрація та подання заявок у проекти є безкоштовними
Доручений:
Аватарка користувача
Hello, I'm an experienced wordpress developer and I'm familiar with Events Manager plugin as well and so I can make the required function within a few hours after you accept my bid. Regards, Tamas
$30 USD за 0 день
4,9 (220 відгуки(-ів))
6,2
6,2
23 фрілансерів(-и) готові виконати цю роботу у середньому за $39 USD
Аватарка користувача
Dear sir, I am good for Wordpress, php, mysql, html, css,....etc so i can help you finish it. Please check my profile and give me this chance. Thank you and waiting here
$35 USD за 0 день
4,9 (256 відгуки(-ів))
7,0
7,0
Аватарка користувача
Hello Sir, I am pleased to inform you that we have 8+ years experienced developers in Mysql. we can surely update single database entry. I would be happy to work with you on this project. We want to build a long term relationship with you. Let's discuss in details and start the work. Awaiting for your response. Thanks, Vijay Thakor
$35 USD за 1 день
5,0 (39 відгуки(-ів))
5,6
5,6
Аватарка користувача
Hello sir. I am a wordpress expert with more than 3 years of experience. Let's discuss more. Regards
$10 USD за 1 день
5,0 (68 відгуки(-ів))
4,9
4,9
Аватарка користувача
Hello, I have ranking in top 5000 on freelancer.com and I hope it will give you an idea about my work quality and dedication to work. You will be safe while working with me. I have dedicated in house team for WordPress, PHP, CakePHP, Bootstrap, Magento, HTML, CSS, JavaScript, Jquery, AJAX, MySQL, PHP framework, API's, PSD to HTML, SQL, JSP, ASP.NET, .NET, App Developer, App Designer, Apache, Websites Design and Development, Web Application Development, E-commerce Website Development, Marketplace Development, Web Portal Development, Custom Software and Plug-in Development, Web Applications Testing, Android Mobile App development and all other IT skills. I will provide you proper proposal and time after you send me message as I can attach any document through PMB only. Please see our portfolio https://www.freelancer.com/u/Dilipjaipur.html?page=portfolio Final price and time I can only quote once complete discussion with you, it may be less then present bidding amount and time. Thanks
$111 USD за 3 дні(-в)
4,9 (10 відгуки(-ів))
4,8
4,8
Аватарка користувача
Hi, 1. do you want a single sql script (query) that update all the entries in the table wp_em_events related to a author_id? ex. UPDATE with JOIN? 2. do you want a trigger script? sql script (UPDATE)? php code? Thanks Angelo
$35 USD за 1 день
5,0 (14 відгуки(-ів))
4,3
4,3
Аватарка користувача
5 Reasons why you should hire me for your custom website and Application Development. 1. Available 24/7 upon your request 2. Delivery on-time with 100% satisfaction 3. Always think beyond boundaries and provide user friendly solution 4. Provide excellence with commitment 5. Most important, Free technical support for lifetime. If you are looking for custom website development like Intranet application, web directory, online community, online portal, online connecting consumer and vendor, you search will end here. About Me: More, over the last 3 years, I have developed a wide range of websites and apps using .Net, PHP, Web based application, Desktop based software, MS Sql and MySQL including sites for start up companies and small businesses. My core competency lies in complete end-end management of a new website development project, and I am seeking opportunities to build websites from the ground up for you or your business. While working on your project, I am taking care of Clean and neat design Daily communication to show progress Unit testing with 100% results Free lifetime support for any technical issue! Thank you
$20 USD за 6 дні(-в)
4,2 (20 відгуки(-ів))
4,8
4,8
Аватарка користувача
A proposal has not yet been provided
$30 USD за 3 дні(-в)
5,0 (7 відгуки(-ів))
3,7
3,7
Аватарка користувача
I am database expert having experience of 3 years.I will complete your work as per requirements and deliver it on time.
$30 USD за 1 день
4,9 (5 відгуки(-ів))
2,9
2,9
Аватарка користувача
Hello I am Software Engineer and expert in database design and development so you can consider me for this Project Thanks I will wait for your quick response
$25 USD за 1 день
2,8 (8 відгуки(-ів))
3,8
3,8
Аватарка користувача
Hi there I am talented and experienced in Mysql, can help you to update the status of a custom post type to 'pending' when the user role is changed to 'subscriber as per the mentioned requirements I AM READY TO START IMMEDIATELY Look forward to hear from you soon Regards Laxmi
$55 USD за 1 день
5,0 (1 відгук)
1,0
1,0
Аватарка користувача
Hello, This is Arpita. I would like to do this task . Please come over pm and lets start the job. We have a whole lot of experience with MYSQL , SQL and Oracle Database. I am looking forward. Thanks and Regards
$25 USD за 1 день
0,0 (0 відгуки(-ів))
0,0
0,0
Аватарка користувача
$30 USD за 1 день
0,0 (0 відгуки(-ів))
0,0
0,0
Аватарка користувача
A proposal has not yet been provided
$25 USD за 1 день
0,0 (0 відгуки(-ів))
0,0
0,0

Про клієнта

Прапор UNITED STATES
Hotchkiss, United States
5,0
14
Спосіб оплати верифіковано
На сайті з січ. 14, 2015

Верифікація клієнта

Дякуємо! Ми надіслали на вашу електронну пошту посилання для отримання безкоштовного кредиту.
Під час надсилання електронного листа сталася помилка. Будь ласка, спробуйте ще раз.
Зареєстрованих користувачів Загальна кількість опублікованих робіт
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Завантажуємо для перегляду
Дозвіл на визначення геолокації надано.
Ваш сеанс входу закінчився, і сеанс було закрито. Будь ласка, увійдіть знову.