Welcome to Egypt Forums Mark forums read | Egypt Main Page
Egypt Forums
Arabic Movies



Web Technology Web Design Tools Photoshop,Dreamweaver,Flash,Etc.Tutorials , References , Examples.

Web Technology Thread, Solved: MySQL Error: No database selected in Programming , WebDesign & Development; Hello. I'm trying to query out of a MySQL database that I made. It is a very simple todo list ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=17169


Reply
LinkBack Thread Tools Display Modes
Solved: MySQL Error: No database selected
 
 
Senior Member

Reply With Quote
 
Join Date: Dec 2008
Posts: 18,122
15-01-2009, 04:50 AM
 
Hello. I'm trying to query out of a MySQL database that I made. It is a very simple todo list database with only one table, four fields, and one record. PHP: --------- $mysql_db = mysql_connect( $db_server, $db_username, $db_password )...

Hello. I'm trying to query out of a MySQL database that I made. It is a very simple todo list database with only one table, four fields, and one record.
PHP Code:
$mysql_db = mysql_connect( $db_server, $db_username, $db_password ) or die( "MySQL Error: ".mysql_error() );

if (
$mysql_db != false )
{
$query = "SELECT todo_item FROM todo_list_table";

$result = mysql_query( $query, $mysql_db ) or die( "MySQL Error: ".mysql_error() );

mysql_close( $mysql_db ) or die( "MySQL Error: ".mysql_error() );
}


When it gets to mysql_query I keet getting a "No database selected" error. Does anyone have any suggestions? Thanks.
 
 
 
Reply

Web Technology Thread, Solved: MySQL Error: No database selected in Programming , WebDesign & Development; Hello. I'm trying to query out of a MySQL database that I made. It is a very simple todo list ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=17169


Bookmarks

Tags
database, error, mysql, selected, solved


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump