Chloe81
Forum Replies Created
-
Forum: Plugins
In reply to: [Form Manager] Get a value from a specific row of fm-databaseP.S. The “code” indication in the quote is the backtiticks that you have to insert in php! ??
Solved!
Forum: Plugins
In reply to: [Form Manager] Get a value from a specific row of fm-databaseOk after hours of study I have understand that I made much errors :D!
First the database is the same database of wordpress so I have to use $wpdb and not $fmdb.My needed was this:
Find in the main form table (avwp_fm_data_1) the value of a column starting from an id stored in another column which is in the same row.So… here the solution… use get_var() and not get_row().
Here is my code… maybe someone need it:
global $wpdb; $table_name = "avwp_fm_data_1"; $rescol = "<code>text-519d03291e327</code>"; $searchcol = "<code>metaidnumber-519a9eca6f567</code>"; $myresult = $wpdb->get_var("SELECT $rescol FROM $table_name WHERE $searchcol = $id", 0, 0);
Remember:
Declare global var at the start.
My table name form is avwp_fm_data_1… with the “av” prefix but this is not a standard so checks yours (you can find it in the database check).
If you make a custom column the name of this column contain a dash that generate a problem in php so remember to use the backticks (`) at beggin and at the end of the column-custom-name.That’s all… more easier than previewed!
Byeee!!!Forum: Fixing WordPress
In reply to: Can reference some items in database but not othersHello. I know you have solved this 8 month ago but I’m fall in the same problem and you put me to the right way… so thank you!!! I don’t speak english very well and I don’t understand what does it means a
sting without hyphens
so forgive me if I write the same thing… but I solved this problem by using this strange character (`) that is not an apostrophe but a backtick. I cannot put an example because this sign is the quote sign but I think you have understand!
Thank you again. ??