MySQL Forums
Forum List  »  PHP

Game shows no database selected
Posted by: michael foster
Date: October 04, 2012 07:34PM

ok when i try and sign up for my game it says that there is no database selected so i reload the database file and i recieve this msg

There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Unknown Punctuation String @ 1
STR: <?
SQL: <?php
$dbhost = 'mysql.serverhere';<?php
$dbhost = 'mysql.serverhere';<?php
$dbhost = 'mysql.serverhere';<?php
$dbhost = 'mysql.serverhere';<?php
$dbhost = 'mysql.serverhere';<?php
$dbhost = 'mysql.serverhere';<?php
$dbhost = 'mysql.serverhere';<?php
$dbhost = 'mysql.serverhere';<?php

SQL query:

<?php $dbhost = 'mysql.server name here';

MySQL said:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '&lt;?php
$dbhost = 'mysql.server name' at line 1

and here is the actual database file

$dbhost = 'mysql.servernamehere';
$dbuser = 'usernamehere';
$dbpass = 'password here';

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error...');

$dbname = 'evil';


please help me figure out what is wrong and why it wont let it accept as the database for players to register

Edited 1 time(s). Last edit at 10/05/2012 05:00PM by michael foster.

Options: ReplyQuote

Written By
Game shows no database selected
October 04, 2012 07:34PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.