Jump to content

Search the Community

Showing results for tags 'Database privilegdes'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 1 result

  1. Hi Im having trouble creating a database via php and selecting it.Can anybody help me? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Create the Database</title></head><body><?php // Script 12.3 - create_db.php/* This script connects to the MySQL server. It also creates and selects the database. */$connection = mysql_connect ("sql106.byethost17.com", "b17_13305510", "musica");// Attempt to connect to MySQL and print out messages:if ($dbc = @mysql_connect('sql106.byethost17.com', 'b17_13305510', 'musica')) { print '<p>Successfully connected to MySQL!</p>'; // Try to create the database:$sql="CREATE DATABASE myblog"; if (mysql_query($connection,$sql)){// if (@mysqli_query($dbc,'CREATE DATABASE myblog' )) { print '<p>The database has been created!</p>'; } else { // Could not create it. print '<p style="color: red;">Could not create the database because:<br />' . mysql_error() . '.</p>'; } // Try to select the database: if (@mysql_select_db( $dbc,'myblog')) { print '<p>The database has been selected!</p>'; } else { print '<p style="color: red;">Could not select the database because:<br />' . mysql_error($dbc) . '.</p>'; } mysql_close($dbc); // Close the connection.} else { print '<p style="color: red;">Could not connect to MySQL:<br />' . mysql_error() . '.</p>';}?></body></html> help me here?
×
×
  • Create New...