God
Jan 30 2005, 08:28 PM
Anyone know how to get rid of this f***ing thing? I've got all my config set right, it can connect to the database, but when I try to select the damn database it gives me this:
QUOTE MySQL Error: 1046 No Database Selected Here's the code for my database class, which I use to process all my database activity. I've got it writing to a log, which says that it connects to the database correctly, but won't select the database.
CODE <?php
require_once("config.php");
class database {
var $handle;
var $db;
var $result;
var $config;
function database() {
@ $this->handle = mysql_pconnect($mysql_host, $mysql_user, $mysql_pass);
$log = fopen("log.txt",'a');
if(!$this->handle) {
fwrite($log,"Error: Could Not Connect to MySQL Database!nMySQL Error:n".mysql_errno()." ".mysql_error()."nnn");
fclose($log);
die("Error: Could Not Connect to MySQL Database!nMySQL Error:n".mysql_errno()." ".mysql_error());
}
else {
fwrite($log, "Connected to MySQL Database Successfully!");
}
@ $this->db = mysql_select_db($mysql_dbname, $this->handle);
if(!$this->db) {
fwrite($log,"Error: Could not select Database!nMySQL Error:n".mysql_errno()." ".mysql_error()."nn");
fclose($log);
die("Error: Could not select Database!nMySQL Error:n".mysql_errno()." ".mysql_error()."nn");
}
else {
fwrite($log,"Selected MySQL Database Successfully!");
}
}
function query($query) {
@$result = mysql_query($query,$this->handle);
$log = fopen("log.txt",'a');
if(!$result) {
fwrite($log,"Error: Query was not executed!nQuery: ".$query."nMysql Error:n".mysql_errno().": ".mysql_error()."nn");
fclose($log);
echo "Non-critical Error: Query was not executed!nQuery: ".$query."nMysql Error:n".mysql_errno().": ".mysql_error()."nn";
return false;
}
else {
fwrite($log,"Query Executed Successfully!nQuery: ".$query."nn");
fclose($log);
$this->result = $result;
}
}
function getconfig() {
if(empty($this->config)) {
$result = $this->query("SELECT title, url, theme FROM config");
if($result) {
$this->config = mysql_fetch_array($result, MYSQL_ASSOC);
return $this->config;
}
else {
$this->config = false;
return $this->config;
}
}
else {
return $this->config;
}
}
}
?>
I know the database exists, and I've got the right user set, but it still won't work!
Reply
Recent Queries:--
mysql_errno 1046 - 418.45 hr back. (1)
-
mysql error 1046 tutorial - 481.97 hr back. (1)
-
mysql error 1046 too many connections - 568.74 hr back. (1)
-
mysql error 1046 when selecting or creating - 574.64 hr back. (1)
-
php "mysql error: 1046" - 733.41 hr back. (1)
-
solution for error 1046 in mysql database - 823.04 hr back. (1)
-
mysql>1046 error - 875.09 hr back. (1)
-
error 1046 - 592.08 hr back. (2)
-
how to handle in mysql error 1046 - 1378.74 hr back. (1)
-
error 1046 mysql - 1621.40 hr back. (1)
-
1046 error in mysql - 1685.10 hr back. (1)
Similar Topics
Keywords : mysql, error, 1046
- Os X Mysql Problem
help needed (0)
Beginning Php And Mysql: From Novice To Professional, Third Edition Review
(1) http://www.amazon.com/Beginning-PHP-MySQL-...768&sr=11-1 This is a very great book for all users,
loaded with great information that covers the basics such as functions, arrays, error handling and
more. Of course, it even covers one of my favorite things to create, forms and of course one of
biggest concerns for all programmers security. However, it doesn't stop there as the authors go
into MySQL one of the most popular open source database software on the market today. So if your a
person getting into PHP and MySQL this book is a great start and as for those w....
How To Connect Mysql With Jsp ?
(4) after many i tried to connect to mysql with jsp, its was now successful. but i can connect at
localhost. i wonder why that. can anybody help me ? it was so good if can post complete system. e.g
(login).....
Email Error Ends Up On Welsh Road Sign
road sign mistranslation error (1) Saw this in the paper yesterday and it made me laugh: The Welsh reads "I am not in the office
at the moment. Please send any work to be translated." When Swansea council emailed a translation
service to translate a new road sign into Welsh, they received a response saying that the translator
was unavailable. Mistaking this for the correct translation of "No entry for heavy goods vehicles.
Residential site only", they had the sign made up and erected outside Asda in Morriston, Swansea.
The sign remained there until local Welsh speakers pointed out the embarrassing....
Getting Php Error On Oscommerce
(3) ok i installed oscommerce on my hosting and i got a template that im trying to isntall on it but
when i go to the install folder it says Server Requirement Error: register_globals is disabled in
your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess
file in your catalog directory. and register_globals is enabled in .htaaccess i cannot find php.ini
sumone PLZZZ help me!!!....
Php Myadmin
can't access mysql database (6) I have installed XAMPP on my computer. Everything works fine, but when I enter PHPMyAdmin I get this
warning: "Your configuration file contains settings (root with no password) that correspond to the
default MySQL privileged account. Your MySQL server is running with this default, is open to
intrusion, and you really should fix this security hole." So I've changed the password to the
root account, but then I couldn't access the mysql databases anymore with PHPMyAdmin (I received
an error that the access was denied). I could change the structures only in php with ....
Website Structure
PHP, MySQL, HTML, etc. (3) Hey guys, I am a very, VERY, curious person on finding out how things work on the computer if I find
them interesting and I can't stop thinking about the thing until I find the answer. The sooner
I find the answer, the less time I get a headache.
So I was wondering how websites work. I mean how
everything would be put together. Like how a game would be put together lin....
Mccodes With Mysql! [resolved]
I need help with this topic (6) Hey all, I was trying to install my McCodes game I bought recently, but every time I try to install
it, I get this error: QUOTE Write Config... Config written. Attempting DB connection
Warning : require(class/class_db_mysql.php) : failed to open stream: No such file or directory in
/home/lwadmin/public_html/installer.php on line 457 Warning :
require(class/class_db_mysql.php) : failed to open stream: No such file or directory in
/home/lwadmin/public_html/installer.php on line 457 Fatal error : require() : Failed
opening required 'class....
Ips Driver Error
Warning messages! (2) Hello Trap17 dudes. Quite frequently I've came across a lot of IPS Driver Errors in the past 2
months. I'm just very curious and worried about the the forum. Sometimes I cannot connect
because of an IPS Driver Error, or IPB Warning error messages. A few moments ago it told me that
there was no shouts submitted to the shoutbox, then it said IPS Driver Error: MySQL failed to
connect to server. What is going on? I didn't have chance to get the error messages precisely
because my browser refreshed too quickly. /huh.gif" style="vertical-align:middle" emoid=":huh....
Mysql Server Down
(10) mysql (5.0.51a-community) failed What is happening? And btw, sometimes I get a message: could not
connect with mysql server. I use joomla 1.5 . but now, the server is down as shown on Server
status... please help....
Vb And Mysql
connecting VB with mysql database (3) hey....i have heard a lot about PHP and MySql, there are a lot of articles about it and every bit of
help is easily available...its a lot easier to set up PHP with MySql....but talking about VB...i
didn't get anything convincing... I know it can be done...if not as easy as Php. I have a
school project in which i have to connect VB application to a mysql database ...please tell me the
easiest way to do it... I have books which tell a lot about VB and oracle....about there
connectivity and database usage..but there is no mention of MySql...I think its not a popular ....
Error Installing Template In Joomla! 1.5.7
(0) Has anyone ever tried to install a template and was given the following error? QUOTE
JFTP::mkdir: Bad response JFTP::chmod: Bad response Template Install: Failed to create directory.
"/home/vol1/byethost10.com/b10_2413307/htdocs/templates/go_vista_plain" I got the same error
while trying to install a template that I was successfully installing on my localhost version of the
site. Note: The site is hosted by Byethost not Trap17.....
Flex Error #1034: Type Coercion Failed: Cannot Convert Mx.managers
(1) Hi Boosters am created below flex module and then include this module to one mxml application .
after that i run that mxml file , its showing combobox successfully. But if i click that combobox
then , following error displayed. anyone know the solution, pls post it. CODE
QUOTE
Error #1034: Type Coercion failed: cannot convert mx.managers::PopUpManagerImpl@91335a1 to ....
Actionscript 3 & Xml Error #1010
Why must it vex me so? (0) This post is about a project I'm working on in Flash CS3, using ActionScript 3 and an external
XML file. I am trying to populate dynamic text fields in a movie clip generated by ActionScript
using data from XML. The line is formatted like so (leaving out the array brackets to avoid code
confusion): CODE clip.txt = xmlList.vname When I run the file like this, the movieclips
appear but are empty. I then modify the code this way: CODE clip.txt.htmlText = xmlList.vname
This generates Error #1010: "A term is undefined and has no properties." Can any ....
Linux/ Apache /mod_rewrite Issue
Error when accessing a file (4) running on Ubuntu 8.04 with an XAMPP - php5.2.5, Apache 2., etc Getting this error when I try to
access an sNews CMS which requires mod_rewrite and is installed locally: QUOTE Apache/2.2.8
(Unix) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8e PHP/5.2.5 mod_apreq2-20051231/2.6.0 mod_perl/2.0.2
Perl/v5.10.0 configured -- resuming normal operations /opt/lampp/htdocs/jim/snews/.htaccess:
RewriteBase: argument is not a valid URL /opt/lampp/htdocs/jim/snews/.htaccess: RewriteBase:
argument is not a valid URL Using this link: http://localhost/jim/snews/snews16_ema....
An XSL Transform Error
Who knows how to fix it? (2) Wel i am working on my project and i am testing some things out with rss feeds, link to site when
i look at my site i'll see the following error in my feed panels : QUOTE MM_XSLTransform
error. The server could not perform the XSL transformation because an XSLT processor for PHP could
not be found. Contact your server administrator and ask them to install an XSLT processor for PHP.
When i googled this error i got the this: Change in your php.ini: ;extension=php_xsl.dll to:
extension=php_xsl.dll So is this possibible on trap17 or do i have to ask a a....
Mysql Hacks
(6) There are MySQL hacks out there, They can travel from your website to your computers. One of these
are the MySQL injectors. The injection drops your tables and shuts down the program permanently. Be
careful of these hacks, as they can destroy your MySQL related websites, programs, etc.....
Need Advice On Setting Up Mysql Database.
I have a huge amount of daily data updates to be inserted. (4) First of all, to get the idea of what I am trying to achieve here, please have a look at my
idea thread, entitled Idea For Using A Cron Job To Grab Daily Travian Map.sql Updates . This gives
a prelude to the project, what it is for, what it is supposed to do, etc. Now, what I need is
specific advice on setting up the mySQL database(s) to implement this idea. There is a useful FAQ
file for how to make use of the map.sql data located on the help.travian.com website, which also
gives an example of the CREATE TABLE instruction that matches the data in the map.sql fi....
Error E74? (xbox 360)
(12) Okay so me and my friend were playing guitar hero and all of a sudden the screen got all block like
and the graphics all turned into green swirly squares. So we thought maybe the A/v cord was loose or
something i turned off the xbox and re-plugged the a/v cords in now every time i turn the xbox on it
flashes 1 red light and says Error E74 in about every language i know of... I have called
1-800-4myxbox and all they said is that they only fix xbox's with the 3 red light error.... what
do i do? thanks.....
Mysql Won't Update
(5) Ok, so I'm making some arcade administration software so I don't have to add games the hard
way, well anyway, one of the features I have is that on the homepage is a featured author and as
such I just have it so it updates one line in the mySQL. Well, the page with the form passes on the
varibles fine and the updating page recieves them because I echoed everything, then I build the
query and I even echo the query and it comes out exactly how I want it to, but for some reason, the
database itself won't update even though all the varibles are there. Here's....
Psp Error- Tut On How To Fix
When you try to use the internet does your psp get an internal error? (32) First of all, psp can browse the internet with its simple browser. BUT! What you may not know is
that there is a bug where when you try to search or use a wireless lan connection (WLAN) the psp may
say something like: Internal Error (80410A0B) To fix this without any memory loss, take out the
UMD which is in the psp, and also take out the memory card. Next, go to settings, then system
settings and click restore settings, the psp may freeze up, but it is not broken, take out the
batter pack and put it back in, the settings should be restored and all should work. So....
Quick Question
Is there a limit on the size of the MySQL database? (10) Question's in the title!....
Connection Error 800a0e7a On Win Server 2003 X64
(1) We have just set up a Windows Server 2003 x64 system for the purposes of being a dedicated web
server/media streaming server. Up to this point, we have been using Windows Server 2003 x86
environment and everything is running well. I have migrated the IIS settings over to the new server
and all appears to be going well when tested except that I have now lost all DB connectivity to the
3 small Access databases that I have in the server. All permissions and set ups are the same.
Based on past experience, I thought that it had to do with my Jet 4.0 drivers not being up t....
Can You Add Images Into A Mysql Database?
Using Php? (21) I'm learning php in class right now, but I'm still not that good at it, what I'm
wondering is when I write the php so that it can connect with a database, can I at the same time
have it that it is able to display back images that I choose. Like, I want a search feature, where
you can search for a keyword, and it will bring back a list of all the possible entries with that
keyword, but each of these entries will have a photo associated with it. Now, do I put these image
files directly into the database, or do I write the code to link them from my files to th....
Help Moving Mysql Files To A New Host
IPB files (2) Well, my partners on my forum has decided to move our site to a newer host. A paid one to be exact.
And we did that already. Now all we need to do is move our forum over to the new host. We want to
do this without losing all of our posts and other data. I know it has something to do with the MySQL
files but I don't really understand it. Some help would be appreciated. We are running Invision
Power Board 1.3.1 final Also, we're thinking about upgrading our board to a newer version of
IPB because we heard that its better in more ways than one. But then again, it....
Mysql Database Size
related to the free database space (7) hi all! this is my first post /biggrin.gif' border='0' style='vertical-align:middle'
alt='biggrin.gif' /> and i have a doubt, how much mysql space i am allowed to use... i mean how
much is available for my free account....
Linking To Mysql From Vb
(7) Hi I have used vb to link to an access 2003 database using the adodc component- (connection string
etc etc). Right I am now working with mysql (which I would like to say I am loving it) and I have
migrated the access 2003 db's into mysql using the migration toolkit . How can I link to mysql
db in a similar fashion. Please reply. Thanx. kvarnerexpress....
Import From Excel File Into Mysql Database
(11) Has anyone tried using the excel import function that comes with phpmyadmin
http://www.phpmyadmin.net/home_page/ - it does not require any additional plug-ins or scripts and
is fairly straightforward to use. In phpmyadmin, if you click on the database table which you wish
to import the data to , there is a link on the bottom left corner which says "insert data from a
text file into the table" - although it says text file it still can be used to import an excel file.
When you click on this link you will be taken to a page where you will be asked for the file name
(the....
---> Ftp Error Codes What They Mean <---
(5) CODE FTP Error Messages some nice info about ftp error codes so you know what they mean. i am
sure you see them all the time and sometimes you dont know what they mean, so take a look here. The
most common codes: 421 - often means: too many users logged to the same account. 530 - wrong
login:pass, some servers auto-switch to 530 from 421 when they reach the max # of users. so notice
the error message attached to the code. 550 - common in Ratio site, If the file exsist it means you
have no access to the file or dir. if you try changing dirs in an FTP and you`re g....
Mysql Downtimes...
(39) There have been issues of MySQL downtimes.. but the main reason is that some members are trying to
experiment stuff. Some of the recent cases . 1> A member tried to send 50,000 emails ... while
most of them were duplicate. I guess, to screw up the server. I had to delete his account. 2> Some
one tried to put random stuff into mySQL database, and he put it into an infinite loop. That caused
mySQL to HOG up since it was expected to execute unlimited queries.. The tmp size was filled and SQL
was down. 3> Someone also tried to abuse JSP/ Tomcat which is THE MOST ADVANCED ....
Looking for mysql, error, 1046
|
*SIMILAR VIDEOS*
Searching Video's for mysql, error, 1046
*MORE FROM TRAP17.COM*
|
advertisement
|
|