Retrieving and Displaying Data From a Table

You have this: <li><?php echo $retrieved_data->column_name;?></li> <li><?php echo $retrieved_data->another_column_name;?></li> <li><?php echo $retrieved_data->as_many_columns_as_you_have;?></li> Here, the code tries to output the data in the column_name column, but there is no column in the table by that name. Likewise, there is no another_column_name or as_many_columns_as_you_have columns in your table. We know that the query pulls in the data, … Read more

Adding column to wpex_users

You should never modify the WP core tables, all your changes will be undone and the data lost the next time WP updates its table schema. Instead, if you want to store more data on a user, do what other people do and use user meta: update_user_meta get_user_meta add_user_meta delete_user_meta You can even query for … Read more

How can I find user role in Mysql?

I’ve decided to use plain Key according to @TomJNowell ‘s comments. If I would like to search a key in serialized data, I would get those serialized array from DB and use maybe_unserialize() in PHP OR use WP_User_Query in PHP. Thank you @TomJNowell

Store GravityForm data in phpmyadmin (mysql)

You can use something like below. Basically after form submission we get the data $entry extract the values we want (in the example $val1, $val2, $val3) then insert that data into the custom table with $wpdb: add_action(‘gform_after_submission’, ‘save_to_my_custom_table’, 10, 2); function save_to_my_custom_table($entry, $form) { global $wpdb; // update for your tablename (this assumes the table … Read more