TinyPortal

Development => Support => Topic started by: Nokonium on July 12, 2005, 09:15:40 PM

Title: I'm getting a database error when I try to delete an article
Post by: Nokonium on July 12, 2005, 09:15:40 PM
QuoteTable 'db119726169.tportal_articles' doesn't exist
File: /homepages/********/Sources/TPortalAdmin.php
Line: 131

Note: It appears that your database may require an upgrade. Your forum files are currently at version SMF 1.0.5, whereas your database is at version SMF 1.0.2. It is recommended that you execute the latest version of upgrade.php.

Line 131 is the db_query

// delete article
        elseif(isset($_GET['artdelete'])){
             $val=$_GET['artdelete'];
             db_query("DELETE FROM tportal_articles WHERE id=$val", __FILE__, __LINE__);
             redirectexit('action=tpadmin;sub=articles');
        }
Title: Re: I'm getting a database error when I try to delete an article
Post by: Bjørn on July 12, 2005, 09:53:29 PM
Do you use another prefix for the tables than "tportal"?
Title: Re: I'm getting a database error when I try to delete an article
Post by: Nokonium on July 12, 2005, 09:57:34 PM
Yes, I modified the prefix to stop problems with two TP test sites on the same server.
Title: Re: I'm getting a database error when I try to delete an article
Post by: Nokonium on July 12, 2005, 10:04:58 PM
Just had a look in phpMyAdmin and I have the following field "sgrportal_articles". Is it as simple as changing that?

While I'm in there and here, my center block problem, is that related? I have a field "sgrportal_blocks" there as well.
Title: Re: I'm getting a database error when I try to delete an article
Post by: Bjørn on July 13, 2005, 09:31:15 AM
After checking out the file, it would seem I have missed several of those.."tportal_xxx" should read "{$tp_prefix}xxx".

So i reckon you need to change that in TPortalAdmin.php or change ALL your tables to tportal_xxx again.

But I will go through and fix this file later today. Out the door as of now. :)
Title: Re: I'm getting a database error when I try to delete an article
Post by: Nokonium on July 13, 2005, 07:42:14 PM
I've changed them, thanks Bloc