Query Program ! use this for your query's like SQLPlus , copy-paste and run

H!
Like the Subject Title:
If you have PHP and Oracle then you can use this if you are learning the query's or you don't wanna use SQLPlus.
BTW this is my first script, but it works fine here.
//the code
<?//made by [email protected]
IF($_SERVER['REQUEST_METHOD'] == 'POST' AND isset($_POST['username']) AND isset($_POST['password'])) {
//gebruik het juiste dll bestand.
dl("php_oci8.dll");
define("USERNAME",$username);
define("PASSWORD",$password);
$conn      = OCILogon(USERNAME,PASSWORD);
$sql      = stripslashes($sql);
IF($btnRollback){
     ocirollback($conn);
     echo "Rollback done !";
IF($btnCommit){
ocicommit($conn);
echo "Committed !";
IF($btnVersion){
     echo OCIServerVersion($conn);
IF($btnSql){
$stmt      = OCIParse($conn,$sql);
IF(OCIExecute($stmt) === TRUE){
          $msg = "The Query was oke !";
if (OCIStatementType($stmt) == "SELECT") {
     $ncols     = OCINumCols($stmt);
     echo "<table width=\"100%\" border=\"1\" cellspacing=\"1\" cellpadding=\"0\" bordercolor=\"#FFFFFF\" bordercolorlight=\"#FFFFFF\" bordercolordark=\"#FFFFFF\">\n";
     echo "<tr>\n";
     for($i=1;$i<=$ncols;$i++){
     $column_name[$i] = OCIColumnName($stmt,$i);     //tabel kopjes
          $column_type[$i] = OCIColumnType($stmt,$i);     //extra info
$column_size[$i] = OCIColumnSize($stmt,$i);      //extra info
          echo "<td class=\"row\"><b>$column_name[$i]</b></td>\n";
     echo "</tr>\n";
     while(OCIFetch($stmt)){
     echo "<tr>\n";
          for($i=1;$i<=$ncols;$i++){
     $column_value[$i] = OCIResult($stmt,$i);
               echo "<td class=\"row\">$column_value[$i]</td>\n";               
     echo "</tr>\n";
     //extra info
     echo "<tr>\n";
     for($i=1;$i<=$ncols;$i++){
          echo "<td class=\"row\"><i>$column_type[$i] $column_size[$i]</i></td>\n";
     echo "</tr>\n";
     echo "</table>\n";
     OCIFreeStatement($stmt);
OCILogoff($conn);
?>
<style type="text/css">
<!--
.row { 
     background-color: #EEEEEE;
     border: #000000;
     border-style: solid;
     border-top-width: 1px;
     border-right-width: 1px;
     border-bottom-width: 1px;
     border-left-width: 1px;
     font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9pt;
-->
</style>
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="submit">
<hr>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="37%">
<textarea name="sql" cols="60" rows="10"><?echo $sql;?></textarea>
</td>
<td width="63%" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="12%">Username:</td>
<td width="88%">
<input type="text" name="username" value="<?echo $username;?>">
</td>
</tr>
<tr>
<td width="12%">Password:</td>
<td width="88%">
<input type="password" name="password" value="<?echo $password;?>">
</td>
</tr>
<tr>
<td width="12%"> </td>
<td width="88%"> </td>
</tr>
<tr>
<td width="12%">
<input type="submit" name="btnSql" value="Sql">
</td>
<td width="88%">
<input type="submit" name="btnCommit" value="Commit">
<input type="submit" name="btnRollback" value="Rollback">
<input type="submit" name="btnVersion" value="Version">
</td>
</tr>
</table>
<?echo $msg;?> </td>
</tr>
</table>
<br>
<font face="Verdana, Arial, Helvetica, sans-serif" size="1">don't use ;</font>
</form>

But your script is not outputing the result of the query. So how do we view the returned resultset.

Similar Messages

  • This program has been blocked for your protection/ An Administrator has blocked you from running this program/ Return code: 1625

    This program has been blocked for your protection/ An Administrator has blocked you from running this program/ Return code: 1625
    If you get a message saying, “Publisher: Not trusted,” the printing functionality you are attempting to use may become blocked while downloading, installing or attempting to run.
    You may also see messages such as:
    MSIExec installation error (Return code:1625)
    The recommended software listed below could not be installed
    “Do you want to allow the following the program from an unknown publisher to make changes to this program”
    “This program has been blocked for your protection”
    “Blocked”
    “Not trusted”
    The Windows User Account Control message may look like this.
    You may get this message when installing, uninstalling, or updating HP software for Windows from the product CD, from software previously downloaded from www.hp.com, or from running HP Smart Install by connecting a printer via USB cable.
    The solution will vary depending on the products that you are using. Here is a helpful document for HP printers that will walk you through what you can do.
    John
    I work on behalf of HP.

    Hey @kat54 ,
    Welcome to the HP Forums!
    I understand you're receiving an error stating "This program has been blocked for your protection."
    You can read about this error here: "Blocked", "User Account Control", "Not trusted", or "Return code: 1625" message in Windows.
    You will find a link for Printers here which directs you to the HP Update Software Utility to resolve the problem. When you install this utility ensure you select version 5.005.002.002 or later.
    Make sure the utility you've downloaded is for your exact product and operating system.
    If this does not resolve the issue please call our technical support at 800-474-6836. If you live outside the US/Canada Region, please click the following link to get the support number for your region: Phone Assist Worldwide.
    Thanks!
    Please click the "Kudos, Thumbs Up" at the bottom of this post if you want to say "Thanks" for helping!
    Please click "Accept as Solution" if you feel my post solved your issue, it will help others find the solution.
    The Great Deku Tree
    I work on behalf of HP.

  • HT201412 my iphone using cant buy anything from itune store and they said i have trouble from the product (Our records indicate that this product has been replaced. Please provide the serial number for your replacement product to find the support and warr

    Our records indicate that this product has been replaced. Please provide the serial number for your replacement product to find the support and warranty coverage information. For more information, please ( this is the trouble they tell us )
    can't buy anything application on appstore, i bought this iphone from my friend , and this iphone actived ( 2012-11-05)
    IMEI: ****
    <Edited By Host>

    Instead of posting your IMEI in a public forum, contact iTunes Customer Support.
    FYI, they do not want/need your IMEI number.

  • Client Server program using Applets for client

    Creating a client server program using Applets for the clients.
    Having problems distrubting the message from client to client
    using ObjectOutputStreams/ObjectInputSteams.
    I can connect each client to simple server and respond with by writting
    the i/o stream of each client but unable to communicate from client to client. If any one out there has in tips of creating a class of objectOutputStreams that holds a array of ObjectOutputStreams and then broadcasts the message to every client, it would be much appreciated
    Thanks.

    Cheers poop for your reply
    I never explained the problem properly. What it is I am trying to set up a Client Server program using Applets as the clients GUI. The problem is broadcasting the message to multiply client connnection(s).
    Below is code, each client can connect and send message to the server. The problems is broadcasting the message to every client connection. The every client can input a message but only the last connected client can receive the message?????? Thanks in advance..
    /*this my server class */
    import java.io.*;
    import java.net.*;
    public class Server extends JFrame
    private static final int ServerPort=8080;
    private static final int MaxClients=10;
    private ObjectOutputStream output=null;
    private ObjectInputStream input=null;
    private BroadCastMessage broadcastMessage;
    public void runServer()          
    BroadCastMessage broadcastMessage= new BroadCastMessage();
    try
    {  //connect to server
    ServerSocket s = new ServerSocket(ServerPort,MaxClients);
         //listen to port 5000 for new connections
         ///max is 25
         System.out.println("Server listening on port "+ServerPort);
    while (state.isProgramRunning())
         try
         /// sGUI.waitForConnection();//new line
         s.setSoTimeout(100);
         //enable times in server-socket
         while (true)     
         Socket incoming = s.accept();
         //wait and accept connnections from serverSocket
         //instance of the class,pases the new connection and message
         //spawn as a thread
         SocketConnection connection=new SocketConnection(incoming,broadcastMessage);
         Thread a = new Thread(connection); a.start();
         System.out.println(state.getConnectionCount()+"Connection received from :"+incoming.getInetAddress());
         catch(InterruptedIOException x){}
    while (state.getConnectionCount()>0);
    System.exit(0);
    }catch (IOException e){}
    public static void main(String[] args)
    Server s =new Server();
         s.runServer();
    /*this is my socket connection thread*/
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    public class SocketConnection implements Runnable
    private ObjectOutputStream out;
    private ObjectOutputStream output=null;
    private ObjectInputStream input=null;
    private BroadCastMessage passOnMessage;
    private Socket theConnection=null;
    private String Inmessage="";
    private int Ocount;
    public SocketConnection(Socket caller,BroadCastMessage broadcastMessage,Ocount)
    theConnection =caller;///(5000,n)
    Ocount=ncount;
    passOnMessage=broadcastMessage;
    public void run()
    try
    getStreams();
    processConnection();
    catch(Exception e)
    {String clientDetails=("connection from IP Address: "+theConnection.getInetAddress());}
    private synchronized void getStreams() throws IOException
    { //get streams to send and receive data
    //set up output buffer to send header information
    ///Ocount++;
    //create new objectoutputstream
    output=passOnMessage.getOutputObject(output,theConnection,Ocount);
    ///flush output buffer to send header info.
    Ocount++;
    //set up input stream for objects
    input =new ObjectInputStream(
    theConnection.getInputStream());
    System.out.print("\nGot I/O streams\n");
    private synchronized void processConnection()throws IOException
    //process connection with client
    String Outmessage =" count : "+status.getConnectionCount();
    //send connection successful message to client
         Outmessage=Outmessage+"SERVER>>>Connection successful";
         output.writeObject(Outmessage);
    output.flush();
    do ///process messages sent from client
         try
         Inmessage = (String) input.readObject();
         System.out.println(Inmessage);
         /* //while the connection is open each line
         that is passed from the client to the server
         is read in and is displayed*/
         messageDetails.setMessage(Inmessage);
         String CurrentMessage=messageDetails.getMessage();
         //output.writeObject(CurrentMessage);
         // output.flush();
         passOnMessage.FloodMessage(CurrentMessage);
         //sending out the message
    catch(ClassNotFoundException classNotFoundException){}
    }while (!Outmessage.equals("CLIENT>>>TERMINATE"));
    /*this my attempt at broadcasting the message to all clients
    my thinking was that you could create a array of objectoutputstreams
    which in turn could be broadcasted(bit confussed here)*/
    import java.io.*;
    import java.net.*;
    public class BroadCastMessage /// implements Runnable
    private int count;
    private String Inmessage="";
    private ObjectOutputStream temp=null;
    private ObjectOutputStream[] output = new ObjectOutputStream [12];
    //temp level of array of objects
    public BroadCastMessage()
    count=0;
    public synchronized void FloodMessage(String message) throws IOException
    System.out.print(count);
         for(int i=0;i<count+1;i++)
         try
    {  System.out.print(count);
         output[count].writeObject(message);
         output[count].flush();
         catch(IOException ioException)
    {ioException.printStackTrace();}
         notifyAll();
    public ObjectOutputStream getOutputObject(ObjectOutputStream out,Socket caller,int Ocount)
    try
    { temp = new ObjectOutputStream(caller.getOutputStream());
         AddObjectOutputStream(temp,Ocount);
    ////FloodMessage();
         catch(IOException ioException)
    {ioException.printStackTrace();}
    return temp;     
    public void AddObjectOutputStream(ObjectOutputStream out,int Ocount)
    { ///add new object to array
    count=Ocount;
    output[count]=out;
    System.out.print("\nthe number of output streams : "+count+"\n");
    }

  • I am not much of a computer technician. I bought a time capsule thinking I could use this for an external hard drive and keep my MAC hard drive free. Was I mistaken? One I back everthing up on the TC, can I delete everything off of my MAC?

    I am not much of a computer technician. I bought a time capsule thinking I could use this for an external hard drive and keep my MAC hard drive free. Was I mistaken? Once I back everything up on the TC, can I delete everything off of my MAC and then use my TC as my hard drive??

    Once I back everything up on the TC, can I delete everything off of my MAC and then use my TC as my hard drive??
    TC was designed to backup your Mac. The TC literature is pretty clear about this:
    If your Mac's hard drive has a problem....it will sooner or later....you can use your backup on the TC to rebuild your Mac.
    But.....if you move all of your data to the TC from your Mac....you only have one version of that data now, and it is on the TC.
    Have you thought about what will happen when....not if....the TC has a problem?  Since the only version of your important data was on the TC, and the TC has failed......you lose all of your data.....because you have no backup.
    A much better plan would be to add a USB or FireWire hard drive and connect it directly to your Mac. Move the data on your Mac over to the hard drive.
    Then, the TC will backup both your Mac and the hard drive.  So, you have original data on on one drive and backups on another drive.
    That would be a minimum backup plan. Most of us have more than one set of backups.

  • How to find out query name using Elements of the query builder.

    Hi SDNers,
    how to find out query name using Elements of the query .
    thanks,
    satyaa

    Hi,
    For having a look at the relation between BEx tables,check the link below:
    http://wiki.sdn.sap.com/wiki/display/BI/ExploretherelationbetweenBEx+Tables
    -Vikram

  • Music on Sound Track Pro? Can we use this for commercial use?

    Does anybody know what the license agreement for the music that comes on the Soundtrack Pro software? It says it's royalty free, but can I use this for commercial use?

    Short answer is yes.  Long answer is read the license agreement and call your lawyer with any questions.
    A couple of years ago I noticed that there were some loops belonging to APM, and raised the issue with them.  It's licensed to Apple and through Apple to you as an owner of the software.  You can NOT repackage and sell the loops though, only use them in your productions.

  • Hi ! i have this new itunes account but when i wanna use this for apps he ask me for a card number but i don't have one .what i supposed to do ?

    Hi ! i have this new itunes account but when i wanna use this for apps he ask me for a card number but i don't have one .what i supposed to do ?

    Hi Mada7ina,
    If you are looking to set up an iTunes Store account without an associated credit card, you may find the following article helpful:
    Apple Support: Creating an iTunes Store, App Store, iBooks Store, and Mac App Store account without a credit card
    http://support.apple.com/kb/ht2534
    Regards,
    - Brenden

  • What does this statement mean: "There is a problem with your authentication, possibly due to inactivity. For your safety, you have been logged out and must sign in again to continue?"

    I am able to make it to the site for about 2 seconds and then I am quickly logged off and the statement, "There is a problem with your authentication, possibly due to inactivity. For your safety, you have been logged out and must sign in again to continue."
    I don't have a clue as to the problem but since this is impacting my participation in these classes and ultimately could have a negative impact on my grade, I am more than a little concerned!

    Have you allowed this site to set cookies?

  • I cannot seem to load raw images into LR 2.5.  I've been using this for years.  I always load from memory card, but it gives me an unknown error message.  I tried to load from camera, hard drive, & external drive and still will not work.  I checked import

    I cannot seem to load raw images into LR 2.5.  I've been using this for years.  I always load from memory card, but it gives me an unknown error message.  I tried to load from camera, hard drive, & external drive and still will not work.  I checked import menu and nothing has changed.  I loaded the photos onto my tablet and images are fine, so do not feel it is the memory card.  Any thoughts?

    The error message probably said "unsupported or damaged"
    The T3 requires Lightroom 3.4.1 or later. You can either upgrade to a more current version of Lightroom (version 5.6 is the most recent) or you can use the free Adobe DNG Converter to convert the RAWs to DNG, which should import into Lightroom properly.

  • Our records indicate that this product has been replaced. Please provide the serial number for your replacement product to find the support and warranty coverage information. For more information, please contact us.

    Hi,
    i have purchased iphone 4s 16GB in india yesterday and when i m checking warranty status of my phone from https://selfsolve.apple.com/agreementWarrantyDynamic.do
    i got responce
    Our records indicate that this product has been replaced. Please provide the serial number for your replacement product to find the support and warranty coverage information. For more information, please contact us.
    Please help

    hi
    if it is from gray market is there any harm on that please let me know
    my phone is working fine and even when i connected to itunes it got registered with my id,

  • Our records indicate that this product has been replaced. Please provide the serial number for your replacement product to find the support and warranty coverage information. For more information, please contact us." how does this possible..???

    I have a horrible time with my new Iphone-4, No SIM card found issues and while i tried to contact customer care with device serial number getting a messgae of "Our records indicate that this product has been replaced. Please provide the serial number for your replacement product to find the support and warranty coverage information. For more information, please contact us."
    What step should i take next.

    Where did you get the phone?
    That phone was replaced by Apple or an AASP and was not returned to Apple as it should have been, or it was stolen from Apple or somewhere in the supply chain.
    You can not get support from Apple for that phone.
    Return it to wherever you got it and get your money back.

  • Our records indicate that this product has been replaced. Please provide the serial number for your replacement product to find the support and warranty coverage information. For more information, please

    Our records indicate that this product has been replaced. Please provide the serial number for your replacement product to find the support and warranty coverage information.

    hi
    if it is from gray market is there any harm on that please let me know
    my phone is working fine and even when i connected to itunes it got registered with my id,

  • Hi Attempting to update my card but keep getting this notice........................."We cannot verify the address that you've entered. Please confirm that you still wish to use this as your billing address, or return to your  billing form to edit your en

    Hi Attempting to update my card but keep getting this notice........................."We cannot verify the address that you've entered. Please confirm that you still wish to use this as your billing address, or return to your  billing form to edit your entry" and my billing My address is correct??@

    The card got declined on September 18th, please contact bank to get the exact reason. The billing details that we have is messaged to you, please confirm the address ,
    The CC is suspended as of now.
    Regards
    Rajshree

  • Hi, i was recently on an IOS 7 update before it's release and downloaded it from the web and i just got this message saying that my device is not registered as a part of the iphone developer. i have been using this for about 2 months now. what is a fix?

    hi, i was recently on an IOS 7 update before it's release and downloaded it from the web and i just got this message saying that my device is not registered as a part of the iphone developer. i have been using this for about 2 months now. what is a fix?

    Were you running iOS 7 beta?  If so, as a developer you need to log into the Developer forum for assistance.
    Not a developer and running iOS 7 beta?  <edited by host>

Maybe you are looking for

  • Creating new buttons on different frame labels

    can someone tell me if im doing something wrong or assigning the as to the wrong frame? first off i have all my buttons on frame 2. im creating a real estate site and i have to have a couple links like HOME ABOUT BUYING SELLING CONTACT, the thing tho

  • Reg:-How to delete PO from Table

    Hi,     I need to know how to delete PO from the table.I know for item deletion. Edited by: Venkadesh on May 22, 2009 2:53 PM

  • How do I create a PDF Form in Pages

    I am trying to work out how I can create a questionnaire in Pages with drop down boxes that converts to a PDF form for my clients to complete. At present I am using Serif on my Windows Laptop but would like to use the Mac to do this. The aim is that

  • MacBook Air from prior MacBook Pro leads to poor performance?

    Last week my laptop (MacBook Pro) was stolen. I decided to buy a MacBook Air and reinstall my applications and some of my data from the MBP to a new MBA. I love the size/weight of the MacBook Air and the battery life but I've been having a number of

  • Invoking reports from menu in designer 10.1.2

    Hello, i'am working on a 6 to 10g migration and have some problems whith the menu that invoke reports. It seems that my predecessor has use the migration utility to migrate the menu. So that the call to run_product where change to rp2rro_run_product.