Greetings.
I'm trying to get a value for a single cell out of a table and into a variable. I
receive the following error message: Warning: Supplied argument is not a valid MySQL
result resource in /home/etc....
My code (abbreviated) is as follows:
$sql2 = "SELECT ServiceDes FROM ServiceTypes WHERE ServiceID = $serviceid";
$service_type = mysql_result($sql2, 1);
The value in $serviceid is valid and displays fine. I'm simply trying to retrieve the
value of ServiceDes from a different table which also has a column named serviceid,
which is unique to the table.
I'm very new to PHP, but I do have lots of SQL experience. I'm used to defining
variables using indicators (ie. SELECT column INTO varname FROM tablename WHERE....),
but this didn't seem to work using PHP/MYSQL.
Thanks,
Dan