Færdiggjort

wordpress table insert with multiple rows out of 1 record

I need some help with following WP query and insert. Query $arrAddress generates 1 record with address data from an address table. That works fine.

Second query check if $user_id is present in testament table. If not present it must insert the data from address table into testament table.

I do not know how to get the address data into table testament. Each address must get a record in testament table. Fields in wp_mm_testament are: userid, field_id, field_value

$arrAddress = $GLOBALS['wpdb']->get_row('SELECT * FROM wp_mm_users_address WHERE user_id = "'.$user_id.'" ');

$arrTestament = $GLOBALS['wpdb']->get_row('SELECT userid FROM wp_mm_testament WHERE userid = "'.$user_id.'" ');

if(count($arrTestament) == 0) { // fields in wp_mm_testament are: userid, field_id, field_value

if(count($arrAddress) > 0) { // wp_mm_users_address has address of user $user_id

['wpdb']->insert('wp_mm_testament', array(

here is the problem to solve

}

}

print_r($arrAddress) result:

stdClass Object ( [id] => 3 [user_id] => 100 [gender] => m [first_name] => Meindert Hendrik [last_name] => Heide Groot [street_address] => Huizenbrink 12 [zipcode] => 8929GH [city] => Eibergen [country] => Nederland )

Task: write me how to get $arrAddress data into wp_mm_testament.

Result of insert() in table wp_mm_testament. is then:

userid, field_id, field_value

3, '3' => $arrAddress['first_name'],

3, '4' => $arrAddress['last_name'],

3, '5' => $arrAddress['gender'],

3, '6' => $arrAddress['street_address'],

3, '7' => $arrAddress['zipcode'],

3, '8' => $arrAddress['city'],

3, '9' => $arrAddress['country']

Realisation: today

I only need how to insert the result into table wp_mm_testament. with ['wpdb']->insert('wp_mm_testament'

Evner: PHP, Software Arkitektur

Se mere: insert record multiple table jsp form, insert table xml record, insert table wordpress page, multiple column posts wordpress, insert video wordpress plugin, display mysql rows php link full table, access table wordpress, aspnet html form insert table, insert table lost connection mysql server query, insert video wordpress

Om arbejdsgiveren:
( 30 bedømmelser ) Enschede, Netherlands

Projekt ID: #8291318

Tildelt til:

SoftEngineer

Hi, please provide the access details for the control panel to check this issue because we need to have a look on the other db tables Regards,

$8 USD / time
(254 bedømmelser)
8.1

12 freelancere byder i gennemsnit $14/time for dette job

seekdeveloper

Hi, I have read your post and understood your requirement. I have great experience in handling /PHP/MySQL/HTML5/jQuery/Wordpress/Magento/Joomla/Drupal/AngularJS/node.js/CSS3/Java/Python/Django/Javascript/iOS/Andr Flere

$25 USD / time
(83 bedømmelser)
8.2
gopalvora

Hi I have gone through the details of your project and we find it well within our capabilities. I offer a wide range of services, including Web design, PHP/MySQL web application development, Open sources like Joo Flere

$8 USD / time
(352 bedømmelser)
7.8
prashushinde9

I want to discuss this project with you further, let me know the best suitable time for you to schedule the meeting, Feel free to message me at any time, i used to be online 14 hrs in a day on this website so probably Flere

$20 USD / time
(39 bedømmelser)
6.4
r4rony

Dear Client, Greetings!! We are WordPress Experts, can do anything in WordPress Custom extensions development as well as setup a complete web shop with all versions. We will assist you to revise your existing Woo Flere

$8 USD / time
(44 bedømmelser)
6.4
webiglobe

Dear Sir, I am really interested to work on this project . I have very good experience of doing this sort of job, I can start the work now and can assure the best service from my end. I am waiting here to discuss Flere

$20 USD / time
(88 bedømmelser)
6.0
developerhunk

Hello , I have read your project details and requirements very carefully and I am very much confident that I can do it in time.. Please talk to me and give me a little chance. Thank You...

$8 USD / time
(36 bedømmelser)
6.5
karunakartiwari

Hello Sir, Greeting for the day, Hope you are doing well We are Group of professional having more than 8 years’ experience in Windows/Linux Server administration , Website Hosting (Cpanel/Plesk) migration, Mail ser Flere

$15 USD / time
(24 bedømmelser)
4.9
naveed254

Get Professional & Creative website that help your business to grow.I am an expert web designer and developer, capable of developing any type of website. I can develop from a standard website to a complete online stor Flere

$15 USD / time
(11 bedømmelser)
4.0
ShounakKatyayan

Hello! I am from Nagpur, India. So what you need is to extract the data from the table and put it into the second table. Message me so that I can understand your task correctly...

$16 USD / time
(1 bedømmelse)
2.5
Anita8931

Hello, As I have seen your Job Post I am ready to work. I am having extensive experience in WordPress development. * Custom Responsive Design * Theme customization * W3C validation * Site Optimization Flere

$8 USD / time
(0 bedømmelser)
0.0
viakssharma

A proposal has not yet been provided

$12 USD / time
(0 bedømmelser)
0.0