Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

database

What is the proper way to validate and sanitize JSON response from REST API?

August 5, 2022 by Magenaut

I have read the WordPress page about this but didn’t find a solution.

Categories Q&A, Wordpress Tags database, rest-api, sanitization, validation Leave a comment

Should close $wpdb via $wpdb->close()

August 5, 2022 by Magenaut

I’ve been writing a few custom plugins for my site and I was wondering about the correct way to interact with $wpdb.
My plugin executes a few queries using the global $wpdb connection.
I noticed that a $wpdb->close(); method has been added to WordPress, to close the database connection object.

Categories Q&A, Wordpress Tags database, wp-query, wpdb Leave a comment

why update and delete query not worked in custom table?

August 5, 2022 by Magenaut

this is custom template. I wrote crud by using wordpress query to sent data in custom table of database and get from database, insert query worked, but update and delete query not working. Below I give update and delete query, please suggest if anyone knows?

Categories Q&A, Wordpress Tags database, mysql, wp-query Leave a comment

$wpdb->get_results($wpdb->prepare(… You have an error in your SQL syntax;

August 5, 2022 by Magenaut

I am making a database request in wordpress to make this question:
select * from tc_chat_clt;

Categories Q&A, Wordpress Tags database Leave a comment

Is it good practice to use wpdb->query() function?

August 5, 2022 by Magenaut

I am using custom php code to perform data insertion, deletion, updating and other tasks. I am able to insert data into a table in two different ways,

Categories Q&A, Wordpress Tags database, functions, mysql, query Leave a comment

What is my error trying to create a new table in the database?

August 5, 2022 by Magenaut

I tried creating the tables in different ways and I always get the same error:
“Error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘( …… at line 1 of the WordPress database for the CREATE TABLE IF NOT query EXISTS”

Categories Q&A, Wordpress Tags customization, database, mysql, table, wpdb Leave a comment

Adding prefix to WordPress database tables breaks admin capabilities?

August 4, 2022 by Magenaut

I have attempted a few different ways (manually, using Brozzme’s DB Prefix Tools & Addons plugin) to add a prefix to an older WP database (right now table names look like posts instead of wp_posts or stx_posts, etc.).

Categories Q&A, Wordpress Tags admin, database, permissions, wp-admin Leave a comment

What structure should post_content have in the database?

August 4, 2022 by Magenaut

Let me start off by saying that I have no WordPress experience at all so I may be asking a really stupid question. What I need to do is transfer a bunch of articles from a old MySQL database to a WordPress site.

Categories Q&A, Wordpress Tags database, posts Leave a comment

Any other way of storing plugin admin data setting

August 4, 2022 by Magenaut

I created a plugin, and used the add_admin_menu() to add some page for users to put their Api keys and secret word.
My page content is just a form to collect those data the users puts in, now my question is apart from sending data to database as to always retrieve them there, is there another place i can store those keys and secret word?

Categories Q&A, Wordpress Tags admin-menu, database Leave a comment

Writing a function for WP Cron to run a SQL command daily

August 4, 2022 by Magenaut

I usually use the events manager in PHP MyAdmin to set up scheduled events but since migrating to WP Engine they do not allow it and I must write a function to use WP Cron instead. What should this look like written as a WP function?

Categories Q&A, Wordpress Tags database, functions, mysql, wp-cron, wpdb Leave a comment
Older posts
Newer posts
← Previous Page1 … Page9 Page10 Page11 … Page17 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress