simple-import-execution.php

query(”
INSERT INTO wp_ennu_assessment_questions (
assessment_type, question_key, question_text, question_type,
options, is_required, scoring_config, sort_order, is_active,
created_at, updated_at
) VALUES (
‘skin’,
‘ennu_global_gender’,
‘What is your gender?’,
‘radio’,
‘{\”female\”:\”FEMALE\”,\”male\”:\”MALE\”}’,
1,
‘[]’,
0,
1,
NOW(),
NOW()
) ON DUPLICATE KEY UPDATE
question_text = VALUES(question_text),
question_type = VALUES(question_type),
options = VALUES(options),
is_required = VALUES(is_required),
scoring_config = VALUES(scoring_config),
sort_order = VALUES(sort_order),
is_active = VALUES(is_active),
updated_at = NOW()
“);

if ($result !== false) {
echo “✅ Test insert successful\n”;

// Check if it worked
$count = $wpdb->get_var(“SELECT COUNT(*) FROM wp_ennu_assessment_questions WHERE assessment_type = ‘skin'”);
echo “???? Skin questions count: $count\n”;

if ($count > 0) {
echo “???? Import is working! Ready to import all data.\n”;
}
} else {
echo “❌ Test insert failed: ” . $wpdb->last_error . “\n”;
}

echo “\n???? Test complete\n”;
?>

Related Posts
Leave a Reply

Your email address will not be published.Required fields are marked *

Image link
Image link
General Popup with Launcher

Creating popups has never been easier thanks to pixfort's next-generation popup builder.

Do you have presale questions?

Contact our team if you have any question

Our usual reply time: 1 Business day

Follow us on

Image link
Image link
General Popup with Launcher

Creating popups has never been easier thanks to pixfort's next-generation popup builder.

Do you have presale questions?

Contact our team if you have any question

Our usual reply time: 1 Business day

Follow us on

Image link
Hey there

Search for a specific article on our website

Get started

Check these useful guides to get started

Still need Help?

Send us a support message

Our usual reply time: 1 Business day
Contact us

Our team will reply as soon as possible.

[contact-form-7 id=”aa06684″ title=”Simple Contact Form”]

Our usual reply time: 1 Business day