How to add a field in the dataabse with install function for a plugin I am creating.
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: How to add a field in the dataabse with install function for a plugin I am creating.
The MySQL query is incorrect.

You need to use an ALTER TABLE query to modify table schema.
http://dev.mysql.com/doc/refman/5.1/en/alter-table.html

UPDATE queries change values in the table, not the table itself.

Depending on what you do, you may also need to update the forum cache after you perform the query.  From memory, it should be something like:

PHP Code:
$cache->update_forums();


My Blog
(This post was last modified: 08-04-2010 10:29 PM by ZiNgA BuRgA.)
08-04-2010 10:28 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: How to add a field in the dataabse with install function for a plugin I am creating. - ZiNgA BuRgA - 08-04-2010 10:28 PM

 Standard Tools
Forum Jump: