[thelist] mySQL/PHP - INSERT not working

Tom Dell'Aringa pixelmech at yahoo.com
Thu Jun 17 10:13:20 CDT 2004


--- "Mr. Tenuta" <dtportnoy at videotron.ca> wrote:
> I'm not used to seeing an include like that, hehe new to me.

There's a couple different ways you can do includes, but suffice to say I am sure it is working :)
(otherwise the whole site would be busted, and it's not)

> ...There is an extra parameter in the mysql_query also.

It's not required, per the manual. They say if it isn't specified, then it looks first at
mysql_connect() for a connection. If nothing there, it uses any existing connection (which is set
in my config file). So it's using my connection there. If it weren't - I would imagine I would be
getting a mySQL error :)

> mysql_query("INSERT INTO scouting(playerID, report) VALUES('" . $pid ."','"
> .. $scout ."')", $link);
> I don't know if it makes a difference but I usually don't leave a space
> between  open brackets.

Tried removing the space, concatenating the values, and various groupings of quotes, all to no
avail. Also checked my column names, which were fine.

Again I can run this query in mySQL successfully so I am really stumped now! How can I debug this?
What can I do to find out what is happening with the query?

Tom

=====
http://www.Pixelmech.com/ - read my latest blog posting!

John 3:16





More information about the thelist mailing list