Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > Web 2.0, Mashups, and Other Web Programming > BOOK: Professional WordPress
|
BOOK: Professional WordPress
This is the forum to discuss the Wrox book Professional WordPress by Hal Stern, David Damstra, Brad Williams; ISBN: 9780470560549
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional WordPress section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 11th, 2010, 10:27 PM
Registered User
 
Join Date: Sep 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Plugin uninstall: why run dbDelta after $wpdb->query($drop_sql)

i am wondering why in chapter 7 plugin development, the code (snipplet) to uninstall a plugin/database table is:

PHP Code:
//build our query to delete our custom table
$sql "DROP TABLE " $table_name ";";

//execute the query deleting the table
$wpdb->query($sql);
require_once(
ABSPATH .’wp-admin/includes/upgrade.php’);
dbDelta($sql); 
my question is why run dbDelta after $wpdb->query($sql); it seems to be doing the same thing

Last edited by jiewmeng; September 11th, 2010 at 10:29 PM..





Similar Threads
Thread Thread Starter Forum Replies Last Post
Update query doesnt run when Select query does (In MS Access) rmccafferty SQL Language 3 February 11th, 2010 04:54 AM
help, this VBA need run 2hours~~ >< kysonMok Excel VBA 4 May 22nd, 2009 04:44 AM
Message> in query expression <expression>. (Error ybg1 Access 5 July 15th, 2007 05:42 AM
MySQL - Uninstall Fix MySQL 2 April 12th, 2006 02:53 AM
Uninstall BETA's first Robert Reno BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 3 February 14th, 2006 12:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.