Re: mysql_query(): supplied argument is not a valid MySQL-Link resource
From: aa (aa_at_virgin.net)
Date: 01/15/05
- Next message: Nikola Skoric: "security flaws in phpBB"
- Previous message: Dynamo: "Still having probs with file upload"
- In reply to: Andy Hassall: "Re: mysql_query(): supplied argument is not a valid MySQL-Link resource"
- Next in thread: Paul Barfoot: "Re: mysql_query(): supplied argument is not a valid MySQL-Link resource"
- Reply: Paul Barfoot: "Re: mysql_query(): supplied argument is not a valid MySQL-Link resource"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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?
- Next message: Nikola Skoric: "security flaws in phpBB"
- Previous message: Dynamo: "Still having probs with file upload"
- In reply to: Andy Hassall: "Re: mysql_query(): supplied argument is not a valid MySQL-Link resource"
- Next in thread: Paul Barfoot: "Re: mysql_query(): supplied argument is not a valid MySQL-Link resource"
- Reply: Paul Barfoot: "Re: mysql_query(): supplied argument is not a valid MySQL-Link resource"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|