Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
Python, Lua and Tcl - public course schedule [here]
Private courses on your site - see [here]
Please ask about maintenance training for Perl, PHP, Java, C, C++, Ruby, MySQL and Linux / Tomcat systems
How to avoid Resource_ID Error ?

Posted by pagalreddy (pagalreddy), 11 October 2005
$quMenu = ociparse($link, "select      OrgID, MenuPosition, DisplayText, LinkDestination,
                                               TargetSpec, IndentAmount
                             from      CmtMenu
                             where      OrgID = 2
                             order by MenuPosition");
     $myresult = ociexecute($quMenu)or ("die Unable to obtain menu items - error ".ocierror());;
           $stDisplayText = ociresult($quMenu, "DisplayText");                              //what users see
           print("DisplayText =".$Displaytext);
           print("quMenu =".$quMenu);
           $stLinkDestination = ociresult($quMenu, "LinkDestination");            //something.php
           $stTargetSpec =ociresult($quMenu, "TargetSpec");                              //where to put it (mainFrame ...)
           $siIndentAmount = ociresult($quMenu, "IndentAmount");                        //menu text indent
           switch ($siIndentAmount)

When I try to Open the page, Near Print its giving me Notice: Undefined variable: Displaytext in D:\inetpub\wwwroot\CMT\cm_menu.php on line 43
DisplayText =quMenu =Resource id #6  
Line 43 is the Print line

Posted by admin (Graham Ellis), 12 October 2005
That's fair enough ... at least in the snippet of code you've posted. It means that you're prining out a variable that hasn't been assigned any value.   It's "just" a notice - PHP will carry on anyway and print nothing at this position.

Footnote for other readers - in PHP you can control the level at which messages are displayed, and the default is that warnings such as the one described in the post are NOT flagged.

Posted by pagalreddy (pagalreddy), 12 October 2005
Thanks for the Help. It worked. But What I would like to know is , Instead of displaying the resource_Id how will It Display whether its getting the results or not

Posted by admin (Graham Ellis), 13 October 2005
It's gpong to return a false value if it fails, do you can check it with an if

This page is a thread posted to the opentalk forum at and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2018: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01225 708225 • FAX: 01225 793803 • EMAIL: • WEB: • SKYPE: wellho