How to avoid Resource_ID Error ?
Posted by pagalreddy (pagalreddy), 11 October 2005$quMenu = ociparse($link, "select OrgID, MenuPosition, DisplayText, LinkDestination,
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
$stLinkDestination = ociresult($quMenu, "LinkDestination"); //something.php
$stTargetSpec =ociresult($quMenu, "TargetSpec"); //where to put it (mainFrame ...)
$siIndentAmount = ociresult($quMenu, "IndentAmount"); //menu text indent
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 2005That'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 2005Thanks 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 2005It's gpong to return a false value if it fails, do you can check it with an if
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: firstname.lastname@example.org • WEB: http://www.wellho.net • SKYPE: wellho