| |||||||||||
| |||||||||||
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 notPosted 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 ifThis 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.
|
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |