Error 1046 No Database Selected Php
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the
Error 1046 (3d000): No Database Selected
company Business Learn more about hiring developers or posting ads with us Stack Overflow error code 1046 no database selected Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7
Error 1046 No Database Selected Mysql Workbench
million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up 1046: No database selected? up vote -1 down vote favorite I am having a problem. The below code, I clearly no database selected mysql error select a database, however it still gives me an error stating I didn't. Can anyone let me know what I am doing wrong? php mysql sql mysqli share|improve this question asked May 14 '13 at 9:31 Natasha Harrell 115 Please see: Why is $foo[bar] wrong? php.net/manual/en/language.types.array.php (A puppy dies when you do this) –Waygood May 14 '13 at 9:54 add a comment| 5 Answers 5 active oldest votes up vote 4 down vote accepted You've misspelled your connection resource variable here: mysqli_select_db($sc, "264191"); Should be mysqli_select_db($nc, "264191"); mysqli_connect also allows you to specify your database as the 4th parameter, making the above line redundant: $nc = mysqli_connect("localhost", "264191", "adhiambo95", "264191"); Try it out. One more thing, pointed out first by Yogesh Suthar, your SQL query is wrong, you have a period where you shouldn't: $sis = "INSERT INTO nogata_keywords ('keyword') VALUE ('.$_GET[keyword]')"; Should be $sis = "INSERT INTO nogata_keywords (`keyword`) VALUE ('".$nc->real_escape_string($_GET['keyword'])."')"; Because you have quoted the field name in single quotes and not escaped the value to be inserted into the database. ie if keyword was O'Neil this would invalidate the SQL. Consider switching to using prepare() and bind() to avoid this issue. You should also use 'keyword' as in index to the $_GET array not just keyword which is actually a constant. http://php.net/manual/en/language.types.array.php share|improve this answer edited May 14 '13 at 10:13 answered May 14 '13 at 9:33 George 27.5k73265 You should
Du kan ändra inställningen nedan. Learn more You're viewing YouTube in Swedish. You can change this preference below. Stäng Ja, behåll den Ångra Stäng Det här
Error 1046 (3d000) No Database Selected Grant
videoklippet är inte tillgängligt. VisningsköKöVisningsköKö Ta bort allaKoppla från Läser in ... no database selected mysql workbench import Visningskö Kö __count__/__total__ Ta reda på varförStäng Fix #1046 - No database selected itcs program PrenumereraPrenumerantSäg upp269269 Läser in
No Database Selected Mysql Command Line
... Läser in ... Arbetar ... Lägg till i Vill du titta på det här igen senare? Logga in om du vill lägga till videoklippet i en spellista. Logga in Dela Mer http://stackoverflow.com/questions/16539621/1046-no-database-selected Rapportera Vill du rapportera videoklippet? Logga in om du vill rapportera olämpligt innehåll. Logga in 22 746 visningar 73 Gillar du videoklippet? Logga in och gör din röst hörd. Logga in 74 7 Gillar du inte videoklippet? Logga in och gör din röst hörd. Logga in 8 Läser in ... Läser in ... Läser in ... Rankning kan göras när videoklippet har hyrts. Funktionen https://www.youtube.com/watch?v=ZciWnmcf7fU är inte tillgänglig just nu. Försök igen senare. Publicerades den 24 apr. 2015how to fix ERROR : #1046 - No database selected MySQL said: Documentation#1046 - No database selected Kategori Spel Licens Standardlicens för YouTube Visa mer Visa mindre Läser in ... Annons Automatisk uppspelning När automatisk uppspelning är aktiverad spelas ett föreslaget videoklipp upp automatiskt. Kommer härnäst MySQL Tutorial for Beginners - 1 - Creating a Database and Adding Tables to it - Längd: 8:50. primetubervideos 652 205 visningar 8:50 MySQL Tutorial 20 - How to use the Insert and Select Commands - Längd: 7:09. CalebTheVideoMaker2 6 064 visningar 7:09 how to import and export data base in sql 2015 - Längd: 10:52. indian highway 260 visningar 10:52 Como importar una base de datos en Wamp Server(proyectos Java) - Längd: 14:53. Luis Angel Manzo 2 629 visningar 14:53 create mysql database, tables and insert data using php functions - Längd: 9:07. kasa sahar 62 095 visningar 9:07 Wordpress Cant Select Database - WordPress Help Video - Längd: 7:33. MrJayBusch 4 914 visningar 7:33 Install XAMPP In Windows 7 - Längd: 6:40. Brad Traversy 130 919 visningar 6:40 MySQL Workbench: Connection Creation a
"#1046: No database selected" error when trying to import a .sql file in phpMyAdmin. Solution #1: Before importing In phpMyAdmin, http://wisercoder.com/how-to-fix-the-1046-no-database-selected-error-in-phpmyadmin/ click on the Export tab from the home page of phpMyAdmin, without selecting any database. phpMyAdmin will then include instructions to create and select the database when you import it. This solution does not apply to most shared hosts, since they won't allow you to create a database from phpMyAdmin. Solution #2: The alternative fix Unlike solution #1, this one also no database works on shared hosts. Create the new database on your server, then write down the name. Open your .sql file with a text editor Insert the following line right before the first CREATE TABLE instruction in your .sql file: USE your_database_name_here; Save your file, then import it in phpMyAdmin. SQL Tagged database, errors, mysql, phpmyadmin, sql ← How to get no database selected an Integer from a Java resultset How to properly validate email addresses in Java → 21 comments on “How to fix the "#1046: No database selected" error in phpMyAdmin” carle November 13, 2013 at 11:34 pm many thanks! save my life! Reply Sam June 3, 2014 at 2:08 pm What i get when i export my database is a notepad file format showing mywebname.sql instead of the normal sql file for upload to liveserver….please help as i dont know what could be wrong. Reply Nicolas Bouliane June 3, 2014 at 3:05 pm Upload that file in the import form Reply Manish Atri November 19, 2013 at 7:43 am Thanks a lot Buddy Reply Juanita Alcachofa December 5, 2013 at 6:32 pm Muy bueno, me sirvió. Reply Ivan January 3, 2014 at 11:07 pm Thank you! Solution #2 worked for me! Reply Pizo January 13, 2014 at 10:41 pm Thank you! Reply Mr January 21, 2014 at 11:54 pm Just wanted to add, since your solution led me to the answer : It's