Jvhcom wrote:
Hello Neil and Chris,
Here are the database-related functions that reside in their own separate
file:
function connecttodatabase() {
global $link_resource;
if(!($link_resource=mysql_connect('host', 'user_name', 'password'))) {
printf("Error connecting to host %s,
Hi
it would be helpful if you pasted to us the error u are getting. So instead
of runquery($dbquery, $link_resource);
use this:
runquery($dbquery, $link_resource) or die(mysql_error());
which will echo out the error.
On 3/28/07, Jvhcom <[EMAIL PROTECTED]> wrote:
Hello Neil and Chris,
Here are
Hello Neil and Chris,
Here are the database-related functions that reside in their own separate
file:
function connecttodatabase() {
global $link_resource;
if(!($link_resource=mysql_connect('host', 'user_name', 'password'))) {
printf("Error connecting to host %s, by user %s", 'ho
In the function to connect to and select the database, I make the mysql-link
resource a global value.
How are you doing that? Code please :) Obviously change the password etc..
And how are you referencing it in the other files/functions?
--
Postgresql & php tutorials
http://www.designmagick
Hi,
>
> In the function to connect to and select the database, I make the mysql-link
> resource a global value.
It sounds like you've misunderstood 'global' variable. The global
statement needs to go inside the function where you want to use the
variable, not where you assign it. This tells th