No error but...

i have this form that i created following this book.
everything was going fine until now.
this is the page :
Text
As everyone can see, when clicking "View Urls" it suppose to
show the list of categories in the drop down menu saved in my url
table. but it doesn't.
i checked and rechecked the add_url.php and view_urls.php and
i dont see no mistakes at all. I check my database and all url
added are listed in the urls table.
This is my view_urls.php code.
I realize that is a big script, i do apologise for that, but
if someone could have a quick look, maybe there's something that i
havent been able to find.
I thank you everyone so much,
My code: :
<?php # Script 12.6 - view_urls.php
// This page displays the URLs listed in the database.
// Set the page title and include the HTML header.
$page_title = 'View URLs';
include ('./includes/header.html');
require_once ('mysql_connect.php'); // Connect to the
database.
// Create a form allowing the user to select a URL category
to view.
echo '<div align="center">
<form method="get" action="view_urls.php">
<select name="type">
<option value="NULL">Choose a Category:</option>
// Retrieve and display the available categories.
$query = 'SELECT * FROM url_categories ORBER BY category
ASC';
$result = mysql_query ($query);
while ($row = mysql_fetch_array ($result, MYSQL_NUM)) {
echo "<option value=\"$row[0]\">$row[1]</option>
// Complete the form.
echo '</select>
<input type="submit" name="submit" value="Go!">
</form>
</div>
// Retrieve the URLs for a particular category, if selected.
// Make sure the type is an integer.
if (isset($_GET['type'])) {
$type = (int) $_GET['type'];
} else {
$type = 0;
if ($type > 0) {
// Get the current type name.
$query = "SELECT category FROM url_categories WHERE
url_category_id=$type";
$result = mysql_query ($query);
list ($category) = mysql_fetch_array ($result, MYSQL_NUM);
echo "<hr /><div
align=\"center\"><b>$category Links</b><br />
<small>(All links will open in their own window.
Recently added links are listed
first.)</small></div>\n";
$first = TRUE; // Initialize the variable.
// Query the database.
$query = "SELECT u.url_id, url, title, description FROM urls
AS u, url_associations AS ua WHERE u.url_id = ua.url_id AND
ua.url_category_id=$type AND ua.approved = 'Y' ORDER BY
date_submitted DESC";
$result = mysql_query ($query);
// Display all the URLs.
while ($row = mysql_fetch_array ($result, MYSQL_ASSOC)) {
// If this is the first record, create the table border.
if($first) {
echo '<table border="0" width="100%" cellspacing="3"
cellpadding="3" align="center">
<tr>
<td align="right" width="40%"><font
size="+1">Link</font></td>
<td align="left" width="50%"><font
size="+1">Description</font></td>
<td align="center" width="10%"> </td>
</tr>';
$first = FALSE; // One record has been returned.
} // End of $first IF.
// Display each record.
echo " <tr>
<td align=\"right\"><a href=\"
http://{$row['url'
target=\"_new\">{$row['title']}</a></td>
<td align=\"left\">{$row['description']}</td>
<td align=\"center\"><a
href=\"edit_url.php?uid={$row['url_id']}\">edit</a></td>
</tr>\n";
} // End of while loop.
// If no records were displayed...
if ($first) {
echo '<div align="center">There are currently no links
in this category.</div>';
} else {
echo '</table>'; // Close the table.
} // End of $_GET['type'] conditional.
mysql_close(); // Close the database connection.
include ('./includes/footer.html');
?>
LMartins

Nobody can see your PHP there, Luis.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"LuisDesigns" <[email protected]> wrote in
message
news:etpntr$4ut$[email protected]..
>i have this form that i created following this book.
everything was going
>fine
> until now.
> this is the page :
>
>
http://therainbowpride.com/myphp2/index.php
>
> As everyone can see, when clicking "View Urls" it
suppose to show the list
> of
> categories saved in my url table. but it doesn't.
> i checked and rechecked the add_url.php and
view_urls.php and i dont see
> no
> mistakes at all. I check my database and all url added
are listed in the
> urls
> table.
>
> This is my view_urls.php code.
> I realize that is a big script, i do apologise for that,
but if someone
> could
> have a quick look, maybe there's something that i havent
been able to
> find.
>
> I thank you everyone so much,
>
>
> LMartins
>

Similar Messages

  • I'm having trouble loading photos on my I phone 4s and I pod.  I don't see the photos tab in Itunes?? Prob user error but wanted to get some help.

    I'm having trouble loading photos on my I phone 4s and I pod.  I don't see the photos tab in I-tunes? I'm sure its user error but wanted to get some help.

    What's the origin of this external drive? It sounds very much like it's a Windows-formatted (NTFS) drive which Macs can't write to. If you can, copy the files off the drive, reformat it as Mac format (using Disk Utility) and copy the files back. If you need to continue writing to it from a Windows PC, you should format it ExFAT in Disk Utility.
    Matt

  • Everytime I  try and sign into my iCloud account it tells me I can't log in due to a server error, but there is nothing wrong with my server . It also wont allow me to view any of my Photos or Documents that i have backed up.

    Everytime I  try and sign into my iCloud account it tells me I can't log in due to a server error, but there is nothing wrong with my server . It also wont allow me to view any of my Photos or Documents that I have backed up. Please help

    Hi,
    Are you running any Anti-virus software or do you have your firewall turned on? If so, disable them and try again. If that doesn't work, delete the iCloud account and then sign it back on again.
    Make sure you are running the most current version of the iCloud Control Panel:
    http://support.apple.com/kb/dl1455
    Cheers,
    GB

  • My shuffle ,doesnt get syncronized with itunes in my pc,getting audio and video settings error,but able to get it syncronized with my friends pc

    my shuffle ,doesnt get syncronized with itunes in my pc,getting audio and video settings error,but able to get it syncronized with my friends pc    

    Try:                                               
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable                     
    - Try on another computer                                                       
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar
    The missing apps could have been done by setting the Restrictions that can hid those apps. If the backup was made with those retrictions set the the Restrictions are also restored.
    Thus, if you get it to work restore to factory settings/new iPod, not from backup                               
    You can redownload most iTunes purchases by:        
      Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • Cash Management - AutoRecon without errors, but still unreconciled?

    Hi guys,
    Pretty interesting question:
    I have multy period's bank file (transactions for 3 accounting periods), all settings are according the manual on AP and CM sides done.
    Statement's Import finished without errors, AutoReconciliation finished without errors, but Statement still have status UNRECONCILED and on AP side transactionsin ap_checks_all table still have STATUS_LOOKUP_CODE as NEGOTIABLE, and CLEARED_AMOUNT, CLEARED_DATE, REQUEST_ID, CLEARED_ERROR_AMOUNT and ACTUAL_VALUE_DATE fields are still empty.
    The periods were OPEN at the time of a run.
    Only when I go to the Statement in CM and open the lines and reconcile them one by one it works.
    Please advise, any help will be appreciated!
    Bok

    Hi,
    Step: 1
    Check the System parameters Auto Reconciliation Setups
    Step: 2
    Check the Bank Statment line has Bank Transaction Code attached
    Step: 3
    Check the Document number given in Bank Statement line is matching exactly with the Payment/Receipt
    Step: 4
    Check the Bank Code attached to line is same as the available line you are trying to match i.e. RCT to Receipt, PMT to Payment etc
    Step: 5
    Assign MO: Security Profile Option to your user id
    Run Autoreconciliation Program now. The issue should be resolved.
    Regards,
    Sridhar

  • Flash player has been installed multiple time without errors but bbc news website and even flash player help say it isn't. How do i get out of this loop? - using windows 7 ultimate and latest IE11

    flash player has been installed multiple time without errors but bbc news website and even flash player help say it isn't. How do i get out of this loop? - using windows 7 ultimate and latest IE11

    I have had the same problem for WEEKS and I cannot access any sites that use Flash. Flash has been installed on this computer since I bought it in 2012. I have allowed auto updates but for weeks the updates never get past Step 2 - is this because I do NOT want the Google Tool bar? I use NO tool bars as there is only 6 inches of vertical screen space. Is this because I uncheck wanting Chrome as a default browser?  It is already installed, I just don't use it.  I came to this site and ran the check is it installed and the system says it is either not installed or not enabled. Version 14 just downloaded about 30 minutes ago - but did not progress to Step 3 although a pop up screen came up with a finish button, which I clicked. WHAT is the problem and how do I fix it?  If this were just a compatibility bug between IE11 and Adobe they have had plenty of time to fix it.
    Stephanie HC

  • Have original ipad which won't backup, itunes says there is an error but won't give me any details

    I have an original ipad which I struggled to update the OS software from 3.2 to 5.0 but eventually managed to do this manually.  HOwever, now there is an update to 5.1 which when I try to do it via wifi, it just says there is an error.  Tried to do it through iTunes but it starts to back up and then tells me there is an error but does not give details, when I click on the further information button it doesn't do anything.  Because it won't back up, it won't let me install the update.  It won't back up either to the computer or to iCloud, I have tried both.  I would be grateful if anyone has any ideas.
    Also, in case anyone can help - several of my apps won't work on my ipad - logo quiz, ibooks (worked fine until I updated software system) and a few others - just flicks on briefly and then throws me out.
    Thanks in advance.

    iPad: Basic troubleshooting
    http://support.apple.com/kb/TS3274
    iTunes: Specific update-and-restore error messages and advanced troubleshooting
    http://support.apple.com/kb/TS3694
     Cheers, Tom

  • Running a query in a View Designer results in an error, but running the same query in a Query window works

    Hi everyone,
    Just as my title says, I have a query which I've written in a query window and it works perfectly.
    But when I try to add the query code into the view designer, it throws a Syntax error.
    Error in ON clause near '('.Unable to parse query text.
    Also, when running the query from the view designer (pressing red exclamation mark) I get a different error.
    SQL Execution Error.Executed SQL statement: SELECT Sku, ParentSku, UPC, ...Error Source: .Net SqlClient Data ProviderError Message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
    Has anyone else experienced this and is there any workaround?
    I have tried to create the view with T-SQL (CREATE VIEW etc.), but when opening it in the view designer I get the error from the 1st image.
    Thank you,
    Radu

    Hi Radu,
    Yes, I have faced similar issue. I had a View and it was working totally fine but when once I opened it in via right click - View Design, it was giving parse error.
    Cause is that Query designer parse and executes the query without error but the way View designer works, it can't parse it.
    Later I ignored View desinger and just used T-SQL like CREATE/ALTER view.
    Workaround is to do right click on View - Script View as - CREATE To/ ATER To.
    Regarding Timeout error, again the issue with View designer which couldn't execute query in there and ended up with timeout error.
    If your SELECT query and SELECT * FROM YourView works fine in Query designer, you are good to go.
    Similar threads:
    View with errors still saved, and still works...
    Parsing error when creating view
    -Vaibhav Chaudhari

  • Error encountered while signing. Windows cryptographic service provider reported an error. Object not found. Error code:2148073489. Windows 7, Adobe Reader XI, Symantec PKI, Smart Card and CAC. I have seen other threads for this error but none have a reso

    Error encountered while signing. Windows cryptographic service provider reported an error. Object not found. Error code:2148073489. Windows 7, Adobe Reader XI, Symantec PKI, Smart Card and CAC. I have seen other threads for this error but none have a resolution. Any help would be appreciated.
    Sorry for the long title, first time poster here.

    This thread is pretty old, are you still having this issue?

  • I downgrad my iphone from ios5 to ios 4.3.3 and after restoring the ios 4.3.3 i fixed all itunes error but after that my i phone screen turned off and the apple logo didnt shows up any more what ever i did my iphone model 4 gsm

    i downgrad my iphone from ios5 to ios 4.3.3 and after restoring the ios 4.3.3 i fixed all itunes error but after that my i phone screen turned off and the apple logo didnt shows up any more what ever i did my iphone model 4 gsm and fyi  i try all the ways to turn it on but it didnt sucsses

    roaminggnome 
      thanks for helping but i didnt know that is the downgrade is forbidden  and i ask for help and u didnt help me so i just want to thank u for telling me that is the downgrade is forbidden >>> but now i didnt have i phone any more so thank u so much again >>>> 

  • Mapping executes without error, but does nothing.

    I've created 21 mappings. 20 mappings work flawlessly and one gives me headaches!
    The mapping is from type: PLSQL.
    It's using an external table to access an 554MB textfile. The OS is RedHat Enterprise Linux WS release 3, Oracle 9.2.0.5, OWB 9.2 + latest patch.
    When I validate the mapping -> everything is okay.
    When I execute the mapping via OEM -> Success message -> in audit browser: 0 rows inserted.
    When I execute the mapping manually -> Success message -> 0 rows inserted.
    When I look at the target table -> 0 rows.
    When I do "select count(*) from external_table_20", I get the correct count for records!
    When I do "create table temp1 as select * from external_table_20 where 1 = 0" I get the correct table structure.
    When I do "insert into temp1 select * from external_table_20", sqlplus blocks for about 10 seconds, but then there are 0 records inserted.
    There are no errors in the kernels logfiles (no read, write or media errors).
    There is no error message in SQLplus.
    There is no entire in the alert file of the database.
    It just does nothing!
    I drop the mapping, the target table and the external table -> and recreated them again (one at a time) -> Same as above. I can count the external_table but the mapping doesn't insert any data. I still can't insert the table on myself.
    So, what can I do now? There is enough space on every tablespace left -> just in case I extended all of them to make sure there will be at least twice as much space as 554 MB (the size of the textfile).
    Its ervy strange that there is not a single error message or warning!

    Art,
    The external tables are tricky because if you make one trivial mistake when describing the records (such as a wrong field length or type), the end result will be that the query against the FT will return no errors, but there will be zero or some weard number of records returned. I suggest to check again the record description and to try to select from the external table (after it is deployed) from SQL plus.
    Also, when configuring the flat file in OWB you can define the log file that will trace FT creation errors during deployment and a Bad file name that will direct the database to write records not fitting into the FT definition to the location specified in 'Bad file name'.
    These configuration parameters can be of help when struggling with the issues mentioned above.
    Regards:
    Igor

  • In Adobe Acrobat X Standard, our user used to be able to resize drawings to 8.5 x 10, it stopped working yesterday. It allows her to do this without an error but the size does not change?

    In Adobe Acrobat X Standard, our user used to be able to resize drawings to 8.5 x 10, it stopped working yesterday. It allows her to do this without an error but the size does not change?

    Try unmounting the volume on your iMac using Disk Utility. Then mount it again. You may need to reboot the laptop or relaunch its Finder process (using the Force Quit window) after remounting the drive on your iMac. Remember that no process may be accessing any files on the drive you plan to unmount, or the unmount will fail. Unmounting and remounting an external drive on my iMac made it become visible on my MacBook Pro after it had disappeared.

  • My iPod says to connect to iTunes, and then it crashes, error 3014, I've tried everything it says that might solve the error but nothing,

    my iPod says to connect to iTunes, and then it crashes, error 3014, I've tried everything it says that might solve the error but nothing

    Not knowing what everything is:
    Error 3194, Error 17, or "This device isn't eligible for the requested build" - Apple Support
    - Try another cable                                                       
    - Try on another computer                                                       
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar                                     

  • I can't log in to game centre but I can log into iTunes. I recently changed my password. I checked the troubleshooter and am getting the message regarding server error but how do I fix this? It doesn't specify this in that article. I don't have firewalls

    I can't log in to game centre but I can log into iTunes. I recently changed my password. I checked the troubleshooter and am getting the message regarding server error but how do I fix this? It doesn't specify this in that article. I don't have firewalls

    Hello sadiepix,
    The following article details several things that can be done to quell iTunes' constant need for authorization.
    iTunes repeatedly prompts to authorize computer to play iTunes Store purchases
    http://support.apple.com/kb/TS1389
    Cheers,
    Allen

  • No Compiling Error but doesn't work NEW

    import java.awt.*;
    import java.awt.geom.*;
    import java.awt.event.*;
    import java.applet.*;
    public class javacw extends Applet implements KeyListener, Runnable
         Area pandaArea;
         Graphics2D g2d;
         // Providing coordinate control for the Panda
         int pandax=20, panday=50;
         // Animation condition. True = animate, False = static.
         boolean pandabool=false, laidOut=false;
         boolean left;
         boolean right;
         boolean up;
         boolean down;
    Thread animThread;
    Dimension offDimension;          // Defines an offscreen Dimension
    Image offImage;                    // Defines an offscreen Image
    Graphics offGraphics;          // Defines an offscreen Graphics
         Image panda;                    // Defines an Image object for panda
         public void init()
              // Set the layout of the applet to null
              setLayout(null);
              panda = getImage(getCodeBase(), "panda.gif");
              pandax=0;
              panday=0;
              addKeyListener(this);
              public void Move ()
                   if (left) {
                        pandax = pandax - 10;
                   if (right) {
                        pandax = pandax + 10;
                   if (up){
                        panday = panday + 10;
                   if (down){
                        panday = panday - 10;
              public void keyTyped(KeyEvent event){}
              public void keyPressed(KeyEvent event)
                   if (event.getKeyCode() == KeyEvent.VK_LEFT) left = true;
                   if (event.getKeyCode() == KeyEvent.VK_RIGHT) right = true;
                   if (event.getKeyCode() == KeyEvent.VK_DOWN) down = true;
                   if (event.getKeyCode() == KeyEvent.VK_UP) up = true;
                   repaint();
              public void keyReleased(KeyEvent e)
                   if (e.getKeyCode() == KeyEvent.VK_LEFT) left = false;
                   if (e.getKeyCode() == KeyEvent.VK_RIGHT) right = false;
                   if (e.getKeyCode() == KeyEvent.VK_UP) up = false;
                   if (e.getKeyCode() == KeyEvent.VK_DOWN) down = false;
                   repaint();
    public void start()
              // Make sure the thread hasn already been created
         if (animThread == null) {
         animThread = new Thread(this, "anim");
         animThread.start();
    public void run() {
              // Create a current thread.
              Thread myThread = Thread.currentThread();
         // As long as the thread is created, keep redrawing the
         // canvas and then pausing for 10 miliseconds.
         while (animThread == myThread) {
                   repaint();
         try {
              Thread.sleep(10);
         } catch (InterruptedException e){}
    public void paint(Graphics g)
              if (offImage != null) {
              g2.drawImage(offImage, 0, 0, null);
         // Overide the update() method
    public void update(Graphics g) {
              Dimension d = getSize();
              // Create the offscreen graphics context
              if ((offGraphics == null)
              || (d.width != offDimension.width)
              || (d.height != offDimension.height)) {
              offDimension = d;
              offImage = createImage(d.width, d.height);
              offGraphics = offImage.getGraphics();
              // Erase the previous image
              offGraphics.setColor(getBackground());
              offGraphics.fillRect(0, 0, d.width, d.height);
              offGraphics.setColor(Color.black);
              paintFrame(offGraphics);               // Paint the frame into the image
              g.drawImage(offImage, 0, 0, null);     // Paint the image onto the screen
    public void paintFrame(Graphics g) {
              Graphics2D g2d = (Graphics2D)g;
              g2d.drawImage(panda, pandax, panday, this);
              if (pandabool) {               // If pandabool==true, animate the panda =)
                   if (pandax>400) pandax=0;
                   if(pandax<0)pandax=400;
    public void stop()
         animThread = null;
              offImage = null;
              offGraphics = null;
    public void destroy(){}
    hi everyone, i'm new to java and i'm trying to wirte a keyListener to makes my image move. btw there are no compiling errors but the key is not working. hope that someone can help me. appreciate

    You have a Move() function that you're not calling! Not much use unless you place a call to it in your run() function, eh?
    Next time you post code, use the  tags.

  • Syntax error but I'm too blind to see...

    Using the below SQL from my usrStartFrm.ASP page to ORA 8i I have set a page variable = a session variable
    +++++++++++++++++++++++
    dim usrLoginID
    SUB usrStartFrm_onenter()
         usrLoginID = Session("LoginID")
    End SUB
    +++++++++++++++++++++++++
    But I cannot return records using the following syntax.
    SELECT DISTINCT
    L.LOGINID,
    B.BUSINESSSEGMENTNAME
    FROM SODA.ASSIGNMENTS_TB A,
    SODA.LOGINS_TB L,
    SODA.BUSSEGMENT_TB B
    WHERE A.FK_LOGIN_NO = L.LOGIN_NO
    AND
    A.FK_BUSSEGID = B.BUSSEGID AND
    (L.LOGINID = '" & usrLoginID &" ')
    ORDER BY B.BUSINESSSEGMENTNAME
    NOR DOES THIS
    ++++++++++++++++++++++++++++++++++++++++++++++++
    (L.LOGINID = '" & Session("LoginID") &" ')
    +++++++++++++++++++++++++++++++++++++++++++++++++
    BUT if I change the sytax to a hard code
    (L.LOGINID = 'ajgrasso')
    The query works.
    I know the page creates the variable because I print it out to the p;age as it loads..
    SO I figure it must be the bugaboo string single double qutes issue.
    Any Ideas.
    Thanks beforehand
    AJ

    It does help somewhat to see the complete code. I can now see and understand how you are building your select statement including your variable and storing the select statement to another variable to be executed. Unfortunately, I don't know enough about ASP and javascript and so forth to be certain of the correct code. However, I can see a lot of similarities between what you are doing and how we build a select statement in PL/SQL and store it to a variable for dynamic execution. There are various ways of including variables within that select statement. About the best I can do is offer various legitimate syntaxes in PL/SQL and hope that you can see the similarities and will be able to adapt one or more of them. In each of the examples below, which demonstrate slightly different methods, I have used current_user for the Oracle user, but you can substitute os_user for current_user in any of them if you want the operating system user. However, note that it will include the domain, like your_domain\ajgrasso so you may need to do some parsing for proper comparison. If you don't get any errors, but it also doesn't return any rows, it might be due to something like that. Notice that, when building a select statement and storing it to a variable, all single quotes within the string must be doubled. That is, replace each single quote with two single quotes (not double quotes) within the string. Also, in Oracle, || is the concatenation symbol, not &. However, because you are using ASP and javascript, if they require double quotes and &, then you may have to experiment with such substitutions. Please see what you can derive from the following and let us know. Also, if it doesn't work for you, please be specific as to whether it returns an error message or if it just doesn't return any rows. A cut and paste of the run, as I have done below, would help.
    SQL> -- test tables and data:
    SQL> SELECT * FROM scott.assignments_tb
      2  /
    FK_LOGIN_NO FK_BUSSEGID                                                        
              1           1                                                        
    SQL> SELECT * FROM scott.logins_tb
      2  /
      LOGIN_NO LOGINID                                                             
             1 SCOTT                                                               
    SQL> SELECT * FROM scott.bussegment_tb
      2  /
      BUSSEGID BUSINESSSEGMENTNAME                                                 
             1 SCOTT bussegname                                                    
    SQL>
    SQL>
    SQL> -- code samples using scott schema
    SQL> -- instead of soda schema:
    SQL>
    SQL>
    SQL> CREATE OR REPLACE PACKAGE types_pkg
      2  AS
      3    TYPE weak_ref_cursor_type IS REF CURSOR;
      4  END types_pkg;
      5  /
    Package created.
    SQL>
    SQL>
    SQL> CREATE OR REPLACE PROCEDURE test_procedure
      2    (p_weak_ref_cursor OUT types_pkg.weak_ref_cursor_type)
      3  AS
      4    CommandText VARCHAR2 (4000);
      5  BEGIN
      6    CommandText :=
      7    'SELECT      DISTINCT
      8             l.loginid,
      9             b.businesssegmentname
    10       FROM      scott.assignments_tb a,
    11             scott.logins_tb      l,
    12             scott.bussegment_tb  b
    13       WHERE      a.fk_login_no = l.login_no
    14       AND      a.fk_bussegid = b.bussegid
    15       AND      (l.loginid = SYS_CONTEXT (''USERENV'', ''CURRENT_USER''))
    16       ORDER BY b.businesssegmentname';
    17 
    18    OPEN p_weak_ref_cursor FOR CommandText;
    19  END test_procedure;
    20  /
    Procedure created.
    SQL> SHOW ERRORS
    No errors.
    SQL> VARIABLE g_ref REFCURSOR
    SQL> EXECUTE test_procedure (:g_ref)
    PL/SQL procedure successfully completed.
    SQL> PRINT g_ref
    LOGINID                        BUSINESSSEGMENTNAME                             
    SCOTT                          SCOTT bussegname                                
    SQL>
    SQL>
    SQL> CREATE OR REPLACE PROCEDURE test_procedure
      2    (p_weak_ref_cursor OUT types_pkg.weak_ref_cursor_type)
      3  AS
      4    CommandText VARCHAR2 (4000);
      5  BEGIN
      6    CommandText :=
      7    'SELECT      DISTINCT
      8             l.loginid,
      9             b.businesssegmentname
    10       FROM      scott.assignments_tb a,
    11             scott.logins_tb      l,
    12             scott.bussegment_tb  b
    13       WHERE      a.fk_login_no = l.login_no
    14       AND      a.fk_bussegid = b.bussegid
    15       AND      (l.loginid = ' || 'SYS_CONTEXT (''USERENV'', ''CURRENT_USER'')' || ')
    16       ORDER BY b.businesssegmentname';
    17 
    18    OPEN p_weak_ref_cursor FOR CommandText;
    19  END test_procedure;
    20  /
    Procedure created.
    SQL> SHOW ERRORS
    No errors.
    SQL> VARIABLE g_ref REFCURSOR
    SQL> EXECUTE test_procedure (:g_ref)
    PL/SQL procedure successfully completed.
    SQL> PRINT g_ref
    LOGINID                        BUSINESSSEGMENTNAME                             
    SCOTT                          SCOTT bussegname                                
    SQL>
    SQL>
    SQL> CREATE OR REPLACE PROCEDURE test_procedure
      2    (p_weak_ref_cursor OUT types_pkg.weak_ref_cursor_type)
      3  AS
      4    usrLoginID  VARCHAR2 (30);
      5    CommandText VARCHAR2 (4000);
      6  BEGIN
      7    usrLoginID := SYS_CONTEXT ('USERENV', 'CURRENT_USER');
      8 
      9    CommandText :=
    10    'SELECT      DISTINCT
    11             l.loginid,
    12             b.businesssegmentname
    13       FROM      scott.assignments_tb a,
    14             scott.logins_tb      l,
    15             scott.bussegment_tb  b
    16       WHERE      a.fk_login_no = l.login_no
    17       AND      a.fk_bussegid = b.bussegid
    18       AND      (l.loginid = ''' || usrLoginID || ''')
    19       ORDER BY b.businesssegmentname';
    20 
    21    OPEN p_weak_ref_cursor FOR CommandText;
    22  END test_procedure;
    23  /
    Procedure created.
    SQL> SHOW ERRORS
    No errors.
    SQL> VARIABLE g_ref REFCURSOR
    SQL> EXECUTE test_procedure (:g_ref)
    PL/SQL procedure successfully completed.
    SQL> PRINT g_ref
    LOGINID                        BUSINESSSEGMENTNAME                             
    SCOTT                          SCOTT bussegname                                
    SQL>
    SQL>
    SQL> CREATE OR REPLACE PROCEDURE test_procedure
      2    (p_weak_ref_cursor OUT types_pkg.weak_ref_cursor_type)
      3  AS
      4    usrLoginID  VARCHAR2 (30);
      5    CommandText VARCHAR2 (4000);
      6  BEGIN
      7    usrLoginID := SYS_CONTEXT ('USERENV', 'CURRENT_USER');
      8 
      9    CommandText :=
    10    'SELECT      DISTINCT
    11             l.loginid,
    12             b.businesssegmentname
    13       FROM      scott.assignments_tb a,
    14             scott.logins_tb      l,
    15             scott.bussegment_tb  b
    16       WHERE      a.fk_login_no = l.login_no
    17       AND      a.fk_bussegid = b.bussegid
    18       AND      (l.loginid = :usrLoginID)
    19       ORDER BY b.businesssegmentname';
    20 
    21    OPEN p_weak_ref_cursor FOR CommandText USING usrLoginID;
    22  END test_procedure;
    23  /
    Procedure created.
    SQL> SHOW ERRORS
    No errors.
    SQL> VARIABLE g_ref REFCURSOR
    SQL> EXECUTE test_procedure (:g_ref)
    PL/SQL procedure successfully completed.
    SQL> PRINT g_ref
    LOGINID                        BUSINESSSEGMENTNAME                             
    SCOTT                          SCOTT bussegname                                
    SQL>
    SQL>
    SQL> CREATE OR REPLACE PROCEDURE test_procedure
      2    (p_weak_ref_cursor OUT types_pkg.weak_ref_cursor_type,
      3       usrLoginID       IN  VARCHAR2)
      4  AS
      5    CommandText VARCHAR2 (4000);
      6  BEGIN
      7    CommandText :=
      8    'SELECT      DISTINCT
      9             l.loginid,
    10             b.businesssegmentname
    11       FROM      scott.assignments_tb a,
    12             scott.logins_tb      l,
    13             scott.bussegment_tb  b
    14       WHERE      a.fk_login_no = l.login_no
    15       AND      a.fk_bussegid = b.bussegid
    16       AND      (l.loginid = :usrLoginID)
    17       ORDER BY b.businesssegmentname';
    18 
    19    OPEN p_weak_ref_cursor FOR CommandText USING usrLoginID;
    20  END test_procedure;
    21  /
    Procedure created.
    SQL> SHOW ERRORS
    No errors.
    SQL> VARIABLE g_ref REFCURSOR
    SQL> VARIABLE usrLoginID VARCHAR2(30)
    SQL> EXECUTE :usrLoginID := SYS_CONTEXT ('USERENV', 'CURRENT_USER')
    PL/SQL procedure successfully completed.
    SQL> EXECUTE test_procedure (:g_ref, :usrLoginID)
    PL/SQL procedure successfully completed.
    SQL> PRINT g_ref
    LOGINID                        BUSINESSSEGMENTNAME                             
    SCOTT                          SCOTT bussegname                                

Maybe you are looking for

  • Changes in custom.css are not displayed on iPad

    Dear all, I'm using a custom.css file in my Analysis Application. Changes in this CSS-file are immediately shown in my design in Design Studio and when executed on the BI Platform. However, these changes are not displayed when I run the application i

  • Custom memory pool.

    Hi! I have been studying different ways to implement object cache for server application(s). At the server there are XML files which have to be parsed and validated before delivering to clients. Clients are also sending XML data back to be validated

  • Regarding Error while executing Bex analyzer after execution

    HI, Need in urgent. I had created a bex query which contains suppose columns A  B C(amounts) , Based on this two columns a formula is created F1 = (AB) and  F2 =  (BC) and F3 = (F1 / F2) now in this case when F2 does not contain any value it is givin

  • Problem creating line chart with character data

    Post Author: burkartt CA Forum: Charts and Graphs CR Developer v. 11.5.0.313 I want to create a line chart with data from a SQL2K table to show how much server time each application uses per day. All data is defined a character. HWA,4/24/2007,01:44.6

  • Elements 10 possibilities

    Does anyone have any info on whether Elements 10 will get rid of gray background (or give options), and make menus etc conform to Windows standards and become readable at high resolutions? These have been topics of complaint for so long it really is