william7neace Posted December 4, 2010 Posted December 4, 2010 i fell pretty stupid right now.... i got this after i filled in the info d=for the installer.php---->>>> QUERY ERROR: Table 'announcements' already exists Query was CREATE TABLE `announcements` ( `a_text` text NOT NULL, `a_time` int(11) NOT NULL default '0') ENGINE=MyISAM ; how do i fix??? ?( ?( Quote
Dominion Posted December 4, 2010 Posted December 4, 2010 i fell pretty stupid right now.... i got this after i filled in the info d=for the installer.php---->>>> QUERY ERROR: Table 'announcements' already exists Query was CREATE TABLE `announcements` ( `a_text` text NOT NULL, `a_time` int(11) NOT NULL default '0') ENGINE=MyISAM ; how do i fix??? ?( ?( They already exist so delete them. I assume this is due to a failed run of the installer.php before hand... Quote
Kieran-R Posted December 4, 2010 Posted December 4, 2010 the table announcements already exists. So delete it. "QUERY ERROR: Table 'announcements' already exists" Common sense really. Isnt it? Quote
william7neace Posted December 4, 2010 Author Posted December 4, 2010 I delete the announcements.php totally and i still have it Quote
Dominion Posted December 4, 2010 Posted December 4, 2010 I delete the announcements.php totally and i still have it Don't clear one table that the installer created, clear them ALL and then run again. That is as long as there’s nothing you need to backup. since this is your 1st install that should not be an issue. Quote
william7neace Posted December 4, 2010 Author Posted December 4, 2010 Did as you said got this Installer 1. Diagnostics >> 2. Configuration >> 3. Installation & Extras Write Config... Config written. Attempting DB connection Connection Successful. Writing Main MySQL data. QUERY ERROR: Table 'announcements' already exists Query was CREATE TABLE `announcements` ( `a_text` text NOT NULL, `a_time` int(11) NOT NULL default '0') ENGINE= Quote
Dominion Posted December 4, 2010 Posted December 4, 2010 If the table exists you did not delete it... Quote
Kieran-R Posted December 4, 2010 Posted December 4, 2010 delete the table announcements. Not the file. Quote
william7neace Posted December 5, 2010 Author Posted December 5, 2010 This is my coding for announcements -----------------------------------> <?php include "globals.php"; $ac=$ir['new_announcements']; $q=$db->query("SELECT * FROM announcements ORDER BY a_time DESC"); print "<table width='80%' cellspacing='1' class='table'> <tr> <th>Time</th> <th>Announcement</th> </tr>"; while($r=$db->fetch_row($q)) { if($ac > 0) { $ac--; $new=" New!"; } else { $new=""; } print "<tr><td valign=top>".date('F j Y, g:i:s a', $r['a_time']).$new."</td><td valign=top>{$r['a_text']}</td></tr>"; } print "</table>"; if($ir['new_announcements']) { $db->query("UPDATE users SET new_announcements=0 WHERE userid={$userid}"); } $h->endpage(); ?> Quote
Danny696 Posted December 5, 2010 Posted December 5, 2010 There is nothing wrong witht the code, its the database. Quote
Dominion Posted December 5, 2010 Posted December 5, 2010 It's not about the file... Go into phpmyadmin and delete the tables that were made by the first run of the installer.php, the one that failed on settings. Quote
william7neace Posted December 5, 2010 Author Posted December 5, 2010 The web service i use doesn't have phpmyadmin. It has SQL buddy Quote
Dominion Posted December 5, 2010 Posted December 5, 2010 The web service i use doesn't have phpmyadmin. It has SQL buddy Whatever program you're using to deal with your database then, the point is the same... Quote
william7neace Posted December 5, 2010 Author Posted December 5, 2010 Well I can't figure it out.... Should i just make a new Db and DB user??? Quote
Dominion Posted December 5, 2010 Posted December 5, 2010 Well I can't figure it out.... Should i just make a new Db and DB user??? I am going to say go and read some tutorials.Even if it's just learning how to drop a table http://www.w3schools.com/sql/sql_drop.asp Quote
Danny696 Posted December 5, 2010 Posted December 5, 2010 No, go to your database, and delete every table. Re-install. Quote
william7neace Posted December 5, 2010 Author Posted December 5, 2010 So should i just drop them all then run installer again??? Export Tables: All / None Export: Structure Data Options: Compact inserts Complete inserts If you are exporting a large number of rows, it is recommended that you output the results to a text file. Output to: Browser Text file: Quote
Danny696 Posted December 5, 2010 Posted December 5, 2010 Just drop them and run the installer again, no need to export Quote
william7neace Posted December 5, 2010 Author Posted December 5, 2010 got it all set but my cpanel doesn't have cron jobs.... how can i get them to work without it???? Quote
Danny696 Posted December 5, 2010 Posted December 5, 2010 Use timestamps, search may bring up some results Quote
william7neace Posted December 5, 2010 Author Posted December 5, 2010 well i am looking on google.... What should i look for??? Quote
Kieran-R Posted December 5, 2010 Posted December 5, 2010 not being a dick or anything, but you have no idea even how to drop a dbtable, and can't tell the difference between a php file, and a db table, yet you are trying to build a game? I suggest you go learn more about PHP, and MySQL before you start trying to build a game. Here's a good site: w3schools.com Quote
Dominion Posted December 5, 2010 Posted December 5, 2010 @Kieran-R - Not as if you have not asked for help before, and he is in fact putting time into reading a fair few pages that people gave him in chat so it's not like he is not trying at this point. Everyone starts somewhere. Quote
Kieran-R Posted December 5, 2010 Posted December 5, 2010 Yea I know, and I give him full credit for that. But I'm just advising him, to at least get a grasp of PHP, and MySQL before jumping into building a game. Quote
Dave Posted December 6, 2010 Posted December 6, 2010 Dude if you need help PM me... This guy reminds me of how I used to be.. Check my old posts and you'll see. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.