Menu
What does this mean and how will I go about fixing this? As I can’t see anything wrong with the line it is specifying.
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in H:xampphtdocswwwtodo1uwafcstatsinstall.php on line 694
[code=php]
if ($row3 = mysql_fetch_array($result3)){
[code=php]
$query = "SELECT something FROM some_table WHERE some_column = 'something'"
$result = mysql_query($query) or die("SQL error: $query -- " . mysql_error());
[/code]
[code=php]
$query = "CREATE TABLE ".$DBprefix."playerpositions
(
PlayerPositionID
tinyint(1) unsigned NOT NULL default '0',
PlayerPositionName
varchar(64) NOT NULL default '',
PRIMARY KEY (PlayerPositionID)
) TYPE=MyISAM;";
$result3 = mysql_query($query);
// check it it was succesfull
if ($result == 1)
{
$resultReturner .= "<tr><th>Creation of playerpositions table</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Creation of playerpositions table</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td></tr>";
}
// check if there isn't any data in the table.
$query3 = "Select * from ".$DBprefix."playerpositions where PlayerPositionsID='1'";
$result3 = mysql_query($query3);
if ($row3 = mysql_fetch_array($result3)){
$resultReturner .= "<tr><th>Creation of playerpositions table</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Admin account already exists</td></tr>";
}else{
// create the matchplace home and away
$query2 = "INSERT INTO ".$DBprefix."playerpositions
(PlayerPositionID
, PlayerPositionName
) VALUES ('1', 'GoalKeeper')";
$result2 = mysql_query($query2);
// check it it was succesfull
if ($result2 == 1){
$resultReturner .= "<tr><th>Insertion of 1 GoalKeeper</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Insertion of 1 GoalKeeper</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td></tr>";}
// create the matchplace home and away
$query4 = "INSERT INTO ".$DBprefix."playerpositions
(PlayerPositionID
, PlayerPositionName
) VALUES ('2', 'Defender')";
$result4 = mysql_query($query4);
// check it it was succesfull
if ($result4 == 1){
$resultReturner .= "<tr><th>Insertion of 2 Defender</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Insertion of 2 Defender</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td></tr>";}
// create the matchplace home and away
$query5 = "INSERT INTO ".$DBprefix."playerpositions
(PlayerPositionID
, PlayerPositionName
) VALUES ('3', 'Midfielder')";
$result5 = mysql_query($query5);
// check it it was succesfull
if ($result5 == 1){
$resultReturner .= "<tr><th>Insertion of 1 Midfielder</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Insertion of 1 Midfielder</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td></tr>";}
// create the matchplace home and away
$query6 = "INSERT INTO ".$DBprefix."playerpositions
(PlayerPositionID
, PlayerPositionName
) VALUES ('4', 'Forward')";
$result6 = mysql_query($query6);
// check it it was succesfull
if ($result6 == 1){
$resultReturner .= "<tr><th>Insertion of 4 Forward</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Insertion of 4 Forward</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td></tr>";}
// create the matchplace home and away
$query7 = "INSERT INTO ".$DBprefix."playerpositions
(PlayerPositionID
, PlayerPositionName
) VALUES ('5', 'Committee')";
$result7 = mysql_query($query7);
// check it it was succesfull
if ($result7 == 1){
$resultReturner .= "<tr><th>Insertion of 5 Committee</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Insertion of 5 Committee</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td></tr>";}
// create the matchplace home and away
$query8 = "INSERT INTO ".$DBprefix."playerpositions
(PlayerPositionID
, PlayerPositionName
) VALUES ('6', 'Manager')";
$result8 = mysql_query($query8);
// check it it was succesfull
if ($result8 == 1){
$resultReturner .= "<tr><th>Insertion of 6 Manager</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Insertion of 6 Manager</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td></tr>";}
// create the matchplace home and away
$query9 = "INSERT INTO ".$DBprefix."playerpositions
(PlayerPositionID
, PlayerPositionName
) VALUES ('7', 'Supporter')";
$result9 = mysql_query($query9);
// check it it was succesfull
if ($result9 == 1){
$resultReturner .= "<tr><th>Insertion of 7 Supporter</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Insertion of 7 Supporter</th><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td></tr>";}
// create the matchplace home and away
$query10 = "INSERT INTO ".$DBprefix."playerpositions
(PlayerPositionID
, PlayerPositionName
) VALUES ('8', 'Old Boy')";
$result10 = mysql_query($query10);
// check it it was succesfull
if ($result10 == 1){
$resultReturner .= "<tr><th>Insertion of 8 Old Boy</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Insertion of 8 Old Boy</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td></tr>";}
}
[/code]
[code=php]
$query = "CREATE TABLE ".$DBprefix."playerpositions
(
PlayerPositionID
tinyint(1) unsigned NOT NULL default '0',
PlayerPositionName
varchar(64) NOT NULL default '',
PRIMARY KEY (PlayerPositionID)
) TYPE=MyISAM;";
$result3 = mysql_query($query);
// check it it was succesfull
if ($result == 1)
{
[/code]
[code=php]
$query = "CREATE TABLE ".$DBprefix."playerpositions
(
PlayerPositionID
tinyint(1) unsigned NOT NULL default '0',
PlayerPositionName
varchar(64) NOT NULL default '',
PRIMARY KEY (PlayerPositionID)
) TYPE=MyISAM;";
$result = mysql_query($query);
// check it it was succesfull
if ($result)
{
[/code]
[code=php]$result3 = mysql_query($query);
// check it it was succesfull
if ($result == 1)[/code]
[/QUOTE]
Well that's not a proper check because [I]$result3[/I] is just the resource. Then in the if condition you are using a different variable name. Use [I]or die[/I] as demonstrated by Nogdog and then to check if a result was returned use [I]mysql_num_rows()[/I][code=php]$query = "SELECT something FROM some_table WHERE some_column = 'something'"
$result = mysql_query($query) or die("SQL error: $query -- " . mysql_error());
if(mysql_num_rows($result) > 0){
// data found
}else{
// data not found
}[/code]
[code=php]
$query3 = "CREATE TABLE ".$DBprefix."playerpositions
(
PlayerPositionID
tinyint(1) unsigned NOT NULL default '0',
PlayerPositionName
varchar(64) NOT NULL default '',
PRIMARY KEY (PlayerPositionID)
) TYPE=MyISAM;";
$result3 = mysql_query($query3);
// check it it was succesfull
if ($result3)
{
$resultReturner .= "<tr><th>Creation of playerpositions table</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Creation of playerpositions table</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td></tr>";
}
// check if there isn't any data in the table.
$query11 = "Select * from ".$DBprefix."playerpositions where PlayerPositionsID='1'";
$result11 = mysql_query($query11);
if ($row11 = mysql_fetch_array($result11)){ //694
$resultReturner .= "<tr><th>Creation of playerpositions table</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Admin account already exists</td></tr>";
}else{
// create the matchplace home and away
$query2 = "INSERT INTO ".$DBprefix."playerpositions
(PlayerPositionID
, PlayerPositionName
) VALUES ('1', 'GoalKeeper')";
$result2 = mysql_query($query2);
// check it it was succesfull
if ($result2 == 1){
$resultReturner .= "<tr><th>Insertion of 1 GoalKeeper</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Insertion of 1 GoalKeeper</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td></tr>";}
// create the matchplace home and away
$query4 = "INSERT INTO ".$DBprefix."playerpositions
(PlayerPositionID
, PlayerPositionName
) VALUES ('2', 'Defender')";
$result4 = mysql_query($query4);
// check it it was succesfull
if ($result4 == 1){
$resultReturner .= "<tr><th>Insertion of 2 Defender</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Insertion of 2 Defender</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td></tr>";}
// create the matchplace home and away
$query5 = "INSERT INTO ".$DBprefix."playerpositions
(PlayerPositionID
, PlayerPositionName
) VALUES ('3', 'Midfielder')";
$result5 = mysql_query($query5);
// check it it was succesfull
if ($result5 == 1){
$resultReturner .= "<tr><th>Insertion of 1 Midfielder</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Insertion of 1 Midfielder</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td></tr>";}
// create the matchplace home and away
$query6 = "INSERT INTO ".$DBprefix."playerpositions
(PlayerPositionID
, PlayerPositionName
) VALUES ('4', 'Forward')";
$result6 = mysql_query($query6);
// check it it was succesfull
if ($result6 == 1){
$resultReturner .= "<tr><th>Insertion of 4 Forward</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Insertion of 4 Forward</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td></tr>";}
// create the matchplace home and away
$query7 = "INSERT INTO ".$DBprefix."playerpositions
(PlayerPositionID
, PlayerPositionName
) VALUES ('5', 'Committee')";
$result7 = mysql_query($query7);
// check it it was succesfull
if ($result7 == 1){
$resultReturner .= "<tr><th>Insertion of 5 Committee</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Insertion of 5 Committee</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td></tr>";}
// create the matchplace home and away
$query8 = "INSERT INTO ".$DBprefix."playerpositions
(PlayerPositionID
, PlayerPositionName
) VALUES ('6', 'Manager')";
$result8 = mysql_query($query8);
// check it it was succesfull
if ($result8 == 1){
$resultReturner .= "<tr><th>Insertion of 6 Manager</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Insertion of 6 Manager</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td></tr>";}
// create the matchplace home and away
$query9 = "INSERT INTO ".$DBprefix."playerpositions
(PlayerPositionID
, PlayerPositionName
) VALUES ('7', 'Supporter')";
$result9 = mysql_query($query9);
// check it it was succesfull
if ($result9 == 1){
$resultReturner .= "<tr><th>Insertion of 7 Supporter</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Insertion of 7 Supporter</th><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td></tr>";}
// create the matchplace home and away
$query10 = "INSERT INTO ".$DBprefix."playerpositions
(PlayerPositionID
, PlayerPositionName
) VALUES ('8', 'Old Boy')";
$result10 = mysql_query($query10);
// check it it was succesfull
if ($result10 == 1){
$resultReturner .= "<tr><th>Insertion of 8 Old Boy</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Insertion of 8 Old Boy</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td></tr>";}
}
[/code]
[code=php]
//
//Pelaajat taulu
//
$query = "CREATE TABLE ".$DBprefix."players
(
PlayerID
int(10) unsigned NOT NULL auto_increment,
PlayerFirstName
varchar(32) NOT NULL default '',
PlayerLastName
varchar(64) NOT NULL default '',
PlayerSeasonID
int(11) unsigned NOT NULL default '0',
PlayerPositionID
tinyint(1) unsigned NOT NULL default '0',
PlayerNumber
tinyint(3) unsigned NOT NULL default '0',
PlayerDescription
text NOT NULL,
PlayerProfile
text NOT NULL,
PlayerPublish
tinyint(1) unsigned NOT NULL default '1',
PlayerShowStats
tinyint(1) NOT NULL default '1',
PlayerAllData
tinyint(1) NOT NULL default '1',
PlayerTask
varchar(128) NOT NULL default '',
PRIMARY KEY (PlayerID)
) TYPE=MyISAM;";
$result = mysql_query($query);
// check it it was succesfull
if ($result == 1){
$resultReturner .= "<tr><th>Creation of players table</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Creation of players table</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td></tr>";
}
//
//Vastustaja omat pelaajat taulu
//
$query = "CREATE TABLE ".$DBprefix."players_opponent
(
PlayerID
int(10) unsigned NOT NULL default '0',
OpponentID
smallint(4) unsigned NOT NULL default '0',
KEY PlayerID (PlayerID),
KEY OpponentID (OpponentID)
) TYPE=MyISAM;";
$result = mysql_query($query);
// check it it was succesfull
if ($result == 1){
$resultReturner .= "<tr><th>Creation of players_opponent table</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Creation of players_opponent table</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td></tr>";
}
//
//Asetukset taulu
//
$query = "CREATE TABLE ".$DBprefix."preferences
(
ID
int(10) unsigned NOT NULL default '0',
TeamName
varchar(128) NOT NULL default '',
DefaultSeasonID
int(11) NOT NULL default '0',
DefaultMatchTypeID
int(11) NOT NULL default '0',
DefaultLanguage
int(10) unsigned NOT NULL default '0',
PRIMARY KEY (ID)
) TYPE=MyISAM;";
$result = mysql_query($query);
// check it it was succesfull
if ($result == 1)
{
$resultReturner .= "<tr><th>Creation of preferences table</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Creation of preferences table</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td></tr>";
}
// check if there isn't any data in the table.
$query3 = "Select * from ".$DBprefix."preferences where ID='1'";
$result3 = mysql_query($query3);
if ($row3 = mysql_fetch_array($result3)){
$resultReturner .= "<tr><th>Creation of preferences</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>There are preferences already installed</td></tr>";
}else{
// create the matchplace home and away
$query2 = "INSERT INTO ".$DBprefix."preferences
(ID
, TeamName
, DefaultSeasonID
, DefaultMatchTypeID
, DefaultLanguage
) VALUES ('0', '$team', '1', '1', '1')";
$result2 = mysql_query($query2);
// check it it was succesfull
if ($result2 == 1){
$resultReturner .= "<tr><th>Insertion of Preferences</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Insertion of Preferences</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td></tr>";}
}
//
//Punaiset kortit-taulu
//
$query = "CREATE TABLE ".$DBprefix."redcards
(
RedCardID
int(10) unsigned NOT NULL auto_increment,
RedCardPlayerID
int(10) unsigned NOT NULL default '0',
RedCardMatchID
int(10) unsigned NOT NULL default '0',
RedCardSeasonID
int(10) unsigned NOT NULL default '0',
RedCardMinute
tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (RedCardID),
KEY RedCardPlayerID (RedCardPlayerID),
KEY RedCardMatchID (RedCardMatchID),
KEY RedCardSeasonID (RedCardSeasonID)
) TYPE=MyISAM;";
$result = mysql_query($query);
// check it it was succesfull
if ($result == 1){
$resultReturner .= "<tr><th>Creation of redcards table</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Creation of redcards table</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td></tr>";
}
//
//Kausien nimet taulu
//
$query = "CREATE TABLE ".$DBprefix."seasonnames
(
SeasonID
int(10) unsigned NOT NULL auto_increment,
SeasonName
varchar(64) NOT NULL default '',
SeasonPublish
tinyint(1) unsigned NOT NULL default '1',
PRIMARY KEY (SeasonID)
) TYPE=MyISAM;";
$result = mysql_query($query);
// check it it was succesfull
if ($result == 1){
$resultReturner .= "<tr><th>Creation of seasonnames table</th><td><img src="../assets/images/icon_ok.gif" height="16" width="16" title="SUCCESSFUL" /></td></tr>";
}else{
// if it wasn't succesfull print the errornumer (with mysql_errno()) and an description of the error (with mysql_error())
$resultReturner .= "<tr><th>Creation of seasonnames table</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>Errornumber ". mysql_errno() .": "". mysql_error() .""</td>";
}
// check if there isn't any data in the table.
$query3 = "Select * from ".$DBprefix."seasonnames where ID='1'";
$result3 = mysql_query($query3);
if ($row3 = mysql_fetch_array($result3)){ //906
$resultReturner .= "<tr><th>Insertion of Current Season Name</th><td><img src="../assets/images/icon_cancel.gif" height="16" width="16" title="ERROR" /></td><td>There are Seasons already installed</td></tr>";
[/code]
<i>
</i>$result = mysql_query($query) [b][color=red]or die("Query: $query -- Error: ".mysql_error())[/color][/b];
0.1.9 — BETA 5.8