Quantcast
Channel: Topic Tag: MySQL | WordPress.org
Viewing all articles
Browse latest Browse all 5527

catacaustic on "access mysql - inserting records, updating records and deleting records"

$
0
0

The WordPress way to do this would be to use the WPDB class to do your database queries. As an example...

$query = "SELECT ID FROM my_table WHERE downloaded = 0";
$wpdb->get_results ($query);
$wpdb->update ('my_table', array (
    'downloaded' => 1,
    'download_user' => 53,
    'download_time' => date ('Y-m-d H:i:s')
));

There's a whole lot more information and examples on the codex page, so have a look through it and I'm sure you'll find that it's what you're looking for.


Viewing all articles
Browse latest Browse all 5527

Trending Articles