Querying SQL Database

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jaykappy
Forum Newbie
Posts: 3
Joined: Fri Aug 15, 2008 8:55 am

Querying SQL Database

Post 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;              
     }
nowaydown1
Forum Contributor
Posts: 169
Joined: Sun Apr 27, 2008 1:22 am

Re: Querying SQL Database

Post by nowaydown1 »

It looks like some kind of database wrapper is being used. Do you know which wrapper is being used?
Post Reply