yrstruly Posted June 2, 2009 Share Posted June 2, 2009 HiIm trying to upload my Joomla template on to the web. Im having trouble with the database. I have exported my database from my loccal machine and imported it into the webhost database. I get the follong error when i have imported my database into the web hopts's: What is wrong and how do i chnagce it?Warning: Cannot modify header information - headers already sent by (output started at /var/wkscript/www/phpmyadmin/libraries/import/sql.php:170) in /var/wkscript/www/phpmyadmin/libraries/header_http.inc.php on line 25 Server: uuuq.com ErrorSQL query: ---- Database: `new`---- ------------------------------------------------------------ Table structure for table `bak_banner`--CREATE TABLE IF NOT EXISTS `bak_banner` (`bid` int( 11 ) NOT NULL AUTO_INCREMENT ,`cid` int( 11 ) NOT NULL DEFAULT '0',`type` varchar( 30 ) NOT NULL DEFAULT 'banner',`name` varchar( 255 ) NOT NULL DEFAULT '',`alias` varchar( 255 ) NOT NULL DEFAULT '',`imptotal` int( 11 ) NOT NULL DEFAULT '0',`impmade` int( 11 ) NOT NULL DEFAULT '0',`clicks` int( 11 ) NOT NULL DEFAULT '0',`imageurl` varchar( 100 ) NOT NULL DEFAULT '',`clickurl` varchar( 200 ) NOT NULL DEFAULT '',`date` datetime DEFAULT NULL ,`showBanner` tinyint( 1 ) NOT NULL DEFAULT '0',`checked_out` tinyint( 1 ) NOT NULL DEFAULT '0',`checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',`editor` varchar( 50 ) DEFAULT NULL ,`custombannercode` text,`catid` int( 10 ) unsigned NOT NULL DEFAULT '0',`description` text NOT NULL ,`sticky` tinyint( 1 ) unsigned NOT NULL DEFAULT '0',`ordering` int( 11 ) NOT NULL DEFAULT '0',`publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',`publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',`tags` text NOT NULL ,`params` text NOT NULL ,PRIMARY KEY ( `bid` ) ,KEY `viewbanner` ( `showBanner` ) ,KEY `idx_banner_catid` ( `catid` ) ) ENGINE = MYISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT =9;MySQL said: #1046 - No database selected Link to comment Share on other sites More sharing options...
justsomeguy Posted June 2, 2009 Share Posted June 2, 2009 MySQL said: #1046 - No database selectedThat should be a pretty big hint. What is your PHP code? If you're trying to run the SQL code directly on MySQL, you just need to tell it which database you're trying to create the table on. Link to comment Share on other sites More sharing options...
yrstruly Posted June 2, 2009 Author Share Posted June 2, 2009 That should be a pretty big hint. What is your PHP code? If you're trying to run the SQL code directly on MySQL, you just need to tell it which database you're trying to create the table on.Can you maybe give me the code to run in the sql...PLEASE? Link to comment Share on other sites More sharing options...
justsomeguy Posted June 2, 2009 Share Posted June 2, 2009 I don't know what your database is called.http://lmgtfy.com/?q=mysql+select+database Link to comment Share on other sites More sharing options...
yrstruly Posted June 2, 2009 Author Share Posted June 2, 2009 That should be a pretty big hint. What is your PHP code? If you're trying to run the SQL code directly on MySQL, you just need to tell it which database you're trying to create the table on.My database name is new, so would it be SELECT DATABASE * NEW;? Link to comment Share on other sites More sharing options...
justsomeguy Posted June 3, 2009 Share Posted June 3, 2009 No, where'd you get that from? Check the results from Google, the top 3 results all have examples of selecting a database to use. Link to comment Share on other sites More sharing options...
yrstruly Posted June 3, 2009 Author Share Posted June 3, 2009 No, where'd you get that from? Check the results from Google, the top 3 results all have examples of selecting a database to use.You now the name of my database now, is it possible you could just give the code to run in SQL please? Link to comment Share on other sites More sharing options...
justsomeguy Posted June 3, 2009 Share Posted June 3, 2009 I could, but then the only thing you would learn is that when you have a question you come here for an answer. I'm trying to make the point that these are things you can look up yourself. When you finally click that Google link and click one of the top 3 results and see how simple it is you're going to wish you had done that sooner.I even already said what the command is that you need to... well, use. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.