RE: [PHP] Troubles Inserting into MYSQL
| From: | bbonkosk at tampabay dot rr dot com | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | RE: [PHP] Troubles Inserting into MYSQL | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-115737@lists.php.net to get a copy of this message | ||
If you read:
http://www.php.net/manual/en/function.mysql-query.php
You will see what $sql4 can be.
My guess would be he is connected to 2 or more different databases, and this is
specifiying which one to execute the query on.
-Brad
> [snip]
> if ($update_type == update_Williams) {
> mysql_query("INSERT INTO events ('user', 'detaildesc',
> 'index', 'reference',
> 'date_added') VALUES (\'$cookiewho\',
>
> \'$add_Williams\',\'\',\'$row_num\',\'$last_update\')",
> $sql4)
> or die ("could not do update");
> }
> [/snip]
>
> Try this
>
> if ($update_type == update_Williams) {
> mysql_query("INSERT INTO events (user, detaildesc, index, reference,
> date_added)
> VALUES ('" . $cookiewho . "', '" . $add_Williams . "',
> '', '" . $row_num .
> "', '" . $last_update . "')", $sql4)
> or die ("could not do update");
> }
>
> First of all, seems there is extra stuff in the query that shouldn't be
> there (what is $sql4?) and you may have parentheses out of place.
>
> HTH!
>
> Jay
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>