$query="SELECT * FROM pwitems where ID ='$selID'";
$SQLresult=mysql_query($query);
if (mysql_errno() != 0) {
$i = 0;
$editHTML = "Please enter the information for the new item";
}else{
$fields = mysql_num_fields($SQLresult);
$rows = mysql_num_rows($SQLresult);
$i = 0;
$editHTML = "You have ".$rows." item open for editing <BR><BR>";
}
I am gettign the following error:
Warning: Cannot use a scalar value as an array in /db.php on line 269
line 269 is the $editHTML = "you have....... ect line.
I have no idea why it is giveing my this error.
This part of the script is designed to check and see if there was an SQL error getting an item from the database. if there is an error it should then default to entering a new item into the database.
Does anyone know what i'm doing wrong? I'm sure it's a silly mistake.
Thank you
Laeelin