![]() |
|
#1
|
|||
|
|||
supplied argument is not a valid MySQL-Link resourceHi,
I am new to this, I am using a Head First PHP & MySQL book and am working on my second task which is inserting data entered via a web form into a MySQL database. I have tested the MySQL statement direct in an SQL query and it works fine, but when ever i submit the form I get the following error: Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/research/public_html/phptest/aliens/report.php on line 32 Error querying database. Here is my php code: PHP Code:
Any help would be greatly appreciated as I am at a loss! Thanks in advance. Richi |
|||
|
#2
|
||||
|
||||
Re: supplied argument is not a valid MySQL-Link resourceThe arguments to the mysql_query() call are reversed; the query is first, the link is second, so just swap the arguments.
Note that if you were using the mysqli_query() function (notice the 'i'), then the supplied arguments are in the correct order. __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
Recent GIDBlog
Toyota - 2009 May Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Str_Misaligned in Double Link List | Peter_APIIT | C Programming Language | 1 | 29-Feb-2008 21:50 |
| Cpanel downgrade MYSQL 4.1.X to MySQL 4.0.xx | Webhosting-live | Web Hosting Forum | 1 | 01-Sep-2006 03:54 |
| not a valid MySQL-Link resource | phpnewbie | MySQL / PHP Forum | 1 | 24-Jun-2005 20:11 |
| Not a Valid MySQL result | phpnewbie | MySQL / PHP Forum | 9 | 22-Feb-2005 22:23 |
| gzwrite(): supplied argument is not a valid stream resource in | JdS | MySQL / PHP Forum | 2 | 24-Mar-2003 08:57 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The