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
 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
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());;
     while($result=ocifetch($quMenu))      
     {
           $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 www.opentalk.org.uk 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., 2024: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho