Page 1 of 1

Not a valid MYSQL link?

Posted: Wed Aug 06, 2008 1:01 pm
by odie2828
This is the code that is creating the problem:

Code: Select all

$result = mysql_query("INSERT INTO news (title, dtime, text1)
         
                            VALUES ('$title',NOW(),'$text1')",$connect);

line 3 it returning the problem:

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /../../../../../add_news.php on line 37

Re: Not a valid MYSQL link?

Posted: Wed Aug 06, 2008 1:09 pm
by RobertGonzalez
Means that $connect is not a valid connection. Did you verify the $connect var?

Re: Not a valid MYSQL link?

Posted: Wed Aug 06, 2008 2:21 pm
by odie2828
I looked into the $connect var and you were correct... there was an extra "," in the string.

thank you