Home » Open Source » Programming Interfaces » implementing the ondblclick feature in php with an oracle database. (PHP and Oracle)
implementing the ondblclick feature in php with an oracle database. [message #310630] |
Tue, 01 April 2008 18:28 |
kingE
Messages: 2 Registered: April 2008
|
Junior Member |
|
|
I am trying to implement the onondblclick feature in php. I have managed to set up the statements below:- $sql="SELECT * FROM PropertyForRent9 ORDER BY PropertyID"; $stmt=ociparse($conn,$sql); ociexecute($stmt); echo("<form name=\"myForm\" method=\"post\" action =\"$PHP_SELF\"> <select class=\"butSt2\" size=\"10\" name=\"sel_id\" ondblclick=\"document.myForm.submit()\">"); while (ocifetchinto($stmt,$myrow, OCI_ASSOC) { if ($myrow["PropertyID"] == $PropertyID) { printf("<option selected value=\"%s\" />%s, %s, %s, %s, %s, %s, %s
", $myrow["PropertyID"], $myrow["LeaseID"], $myrow["PropertyOwnerID"], $myrow["street"], $myrow["city"], $myrow["postcode"], $myrow["TypeOfProperty"], $myrow["furniture"]); }else{ printf("<option selected value=\"%s\"/>%s,%s,%s,%s,%s,%s,%s
", $myrow["PropertyID"], $myrow["LeaseID"], $myrow["PropertyOwnerID"], $myrow["street"], $myrow["city"], $myrow["postcode"], $myrow["TypeOfProperty"], $myrow["furniture"]); } } echo("</select></form>"); ocifreestatement($stmt); There are three rows of data in the PropertyForRent9 table and every time i run the php file it brings up something like this. ie:- , , , , , , , , , , , , , , , , , , in otherwords no data is collected from the database. Has any one got a way to implement this. thanks, kingE
|
|
|
|
Re: implementing the ondblclick feature in php with an oracle database. [message #311217 is a reply to message #310632] |
Thu, 03 April 2008 13:50 |
kingE
Messages: 2 Registered: April 2008
|
Junior Member |
|
|
Hi thanks for the reply,
i am quite new to this stuff and that is why am seeking help.
i only started using oracle and php this year.
so i suppose i can not successfuly use php to get data from oracle.
If i use the echo statements to just print out the list of that data in that table, the results are shown successfully. But if i use the double click feature as that one described below in the echo statement nothing comes up. just blanks separated by comas.
I was intending to display an array of data from the table and on double clicking the result it is posted to a different same form in a secton benlow form for editing or deleting.
what could be the best way to implement this.
thanks.
I have attached the code of the file below.
$sql="SELECT * FROM PropertyForRent9 ORDER BY PropertyID"; $stmt=ociparse($conn,$sql);
ociexecute($stmt);
echo("<form name=\"myForm\" method=\"post\" action=\"$PHP_SELF\"> <select class=\"butSt2\" size=\"10\" name=\"sel_id\" ondblclick=\"document.myForm.submit()\">");
while (ocifetchinto($stmt,$myrow, OCI_ASSOC)
{ if ($myrow["PropertyID"] == $PropertyID)
{ printf("<option selected value=\"%s\" />%s, %s, %s, %s, %s, %s, %s", $myrow["PropertyID"], $myrow["LeaseID"], $myrow["PropertyOwnerID"], $myrow["street"], $myrow["city"], $myrow["postcode"], $myrow["TypeOfProperty"], $myrow["furniture"]); }
else{ printf("<option selected value=\"%s\"/>%s,%s,%s,%s,%s,%s,%s
", $myrow["PropertyID"], $myrow["LeaseID"], $myrow["PropertyOwnerID"], $myrow["street"], $myrow["city"], $myrow["postcode"], $myrow["TypeOfProperty"], $myrow["furniture"]);
}
}
echo("</select></form>");
-
Attachment: new22.txt
(Size: 5.17KB, Downloaded 2535 times)
|
|
|
|
Goto Forum:
Current Time: Thu Feb 06 21:14:17 CST 2025
|