Hi Pete, Thanks for the email. I will re-check my codes. I also thought so. But the weird thing is that Dreamweaver always adds that part in their standard of building queries. I'll remove those if it's not an important thing to use.
Regards, Martin On Thu, Aug 21, 2008 at 6:43 AM, Pete <[EMAIL PROTECTED]> wrote: > In message <[EMAIL > PROTECTED]<6930a4490808202319i3e083eag42429100c0482a2d%40mail.gmail.com> > >, > Martinus Hadiwinata <[EMAIL PROTECTED]<martinus.ardian%40gmail.com>> > writes > > >Hi Guys, > > > >I got this warning on several page: > >*Warning*: mysql_free_result(): 25 is not a valid MySQL result resource > > > >Does anyone know how to get rid this warning message that appears on a > page > >without using error_reporting() function? > > > >I have checked my syntax and they seem fine and correct. Moreover, the > page > >displays the items as it should be. > > As it would do, since free result would come after displaying the data. > > Suggestions > > 1) Don't use it <G> it isn't usually necessary, unless you are > returning huge datasets, as the memory is freed when the script ends, if > you are not using persistent connections. > > 2) You should be feeding it with the variable which you get from your > query > $result = mysql_query("SELECT * FROM everything"); > ... > mysql_free_result($result) > > and $result won't contain 25, which is what you get in your error > message. It should be a resource, not a number. > > -- > Pete Clark > > Sunny Andalucia > http://hotcosta.com/Andalucia.Spain > > [Non-text portions of this message have been removed]