Re: mysql_query(): supplied argument is not a valid MySQL-Link resource

From: aa (aa_at_virgin.net)
Date: 01/15/05


Date: Sat, 15 Jan 2005 11:25:36 -0000

I looked up "PHP and MySQL Web Developement" by Luke Welling and Laura
Thomson.
In the para "Scope of variables" it reads (the book is translated into
Russian and I translate is back into English):
"Variables declared as global in a scenario are seen throughout the
scenario, but not seen from within functions. By default all the variables
declared in a scenario outside functions are global."

It looks like if query MySQL from a function, I will have to put all the
database related variables inside the function. And therefore to open and
close a connection to the database very time I run a query.
In my case I am building a page by sending different queries to the
database.
Opening and closing the connection for every query looks like an unnecessary
overhead.

Can I get round it?



Relevant Pages

  • Re: CAT tool to translate Paradox database?
    ... But my question is the export/import procedure while handling the Paradox ... DBC can dump the entire content of the database into TXT or XML files?! ... and have a prospective assignment to translate ...
    (comp.databases.paradox)
  • Re: Merge Replication Performance Issues/Trace Files
    ... Do you also know where can I translate the ... "Hilary Cotter" wrote: ... > run this query in your subscription database ... >> on one server and the publisher on another. ...
    (microsoft.public.sqlserver.replication)
  • Re: CAT tool to translate Paradox database?
    ... Off course we're working on the content of the fields, not the database coding ... We've tried to export as csv files with DBC, ... and have a prospective assignment to translate ... party CAT tool, and re-import it again using DBC. ...
    (comp.databases.paradox)
  • Re: CAT tool to translate Paradox database?
    ... What does "choke" mean? ... each), so we'd very much like to export the content, translate it with our ... We've tried to export as csv files with DBC, ... Does anyone of you guys have a different database editor that could handle ...
    (comp.databases.paradox)
  • Re: record too large...
    ... you need to compact and repair the database frequently. ... about 2000 characters in any record, excluding memo, hyperlink and OLE ... I wrote a function which allows me to translate my ... field1, and copy of buffer data to field2, erase buffer field. ...
    (microsoft.public.access.tablesdbdesign)