Page 1 of 1

Querying SQL Database

Posted: Fri Aug 15, 2008 9:01 am
by jaykappy
Hello -

I am trying to code below...but am needing to modify it to return specific fields in the table. Very new to this and hoping to get a little help
I wouold imagine that the code in red below is the part that needs to be modified to return:

Field 1 Value
Field 2 Value
etc
etc

Anyone out there that can give me a hand?

Thanks in advance



Code: Select all

   $sql_str2 = "SELECT * FROM DISPLAY_VALUES WHERE PID = '".$p_num."'";
    $photo_rs2 = $conn->execute($sql_str2); 
    echo "<div class='redbg'> <b><big>TESTING:</big></b></div>";
    echo "<br>";
    If ($photo_rs2->EOF)
    {
        echo "No values exist for this parcel!";
    } else
    {
 
[color=#BF0000]             $p_name2 = $photo_rs2->Fields("Filename")->Value;
            $p_hype2 = "javascript&#058;window.open('file://S:/GeoImag/Assessing/Sketches/".$p_name2."','photowindow','width=450,height=350')";
            writelinewhype($p_name2,"Image",$p_hype2);
            $photo_rs2->MoveNext();[/color]
 
        }
        echo "</table>";
        $photo_rs3->Close();
        $photo_rs3 = null;              
     }

Re: Querying SQL Database

Posted: Fri Aug 15, 2008 3:36 pm
by nowaydown1
It looks like some kind of database wrapper is being used. Do you know which wrapper is being used?