how to get up row in wordpress with wpdb
Question
I want to compare two prices in my database. I get a row with any id:
$price1 = $wpdb->get_row( "SELECT * FROM $wpdb->prices WHERE id = 10" );
I want to get up the row from this table means I want to get row same bellow but if row by id 9 is deleted it’s missing:
$price1 = $wpdb->get_row( "SELECT * FROM $wpdb->prices WHERE id = 9" );
How do this?
0
plugin-development
4 years
2020-03-23T12:51:49-05:00
2020-03-23T12:51:49-05:00 0 Answers
110 views
0
Leave an answer