> Hi guys,
> Recently, I had to reformat one of the web servers and now I have
> encountered an unusual problem. I am not sure whether this is an
> issue which
> can be fixed in the .ini file or whether its specific to the
> version of php
> I am using.
>
> Here is the problem:
>    $query="SELECT * FROM customizeViewClients WHERE employeeNum =
> $employeeNum";
>    $results=mssql_query($query, $connection) or die("Couldn't execute
> query");
>    $numRows=mssql_num_rows($results);
>
>     if($numRows>0)
>    {
>          $row=mssql_fetch_array($results);
>     }
>
>      $selectedCol=$row["selectedCol"];
>       echo $selectedCol;
>      $selectedColName=$row[$selectCol];   //<--- PLEASE NOTE THIS SPECIFIC
ROW
[snip]

Note because you used $selectCol instead of $selectedCol?

I would also move the } to after this line so that you do not attempt to
access non-existent array elements when no rows are returned.

HTH

Graham

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to