Re: mysql problem
| From: | Thomas Deliduka | Date: | Tue, 20 Feb 2001 06:36:42 +0000 |
| Subject: | Re: mysql problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-40697@lists.php.net to get a copy of this message | ||
I think if you echo the error (echo mysql_error();) you will see the exact
error you would get if connected directly to the db.
You can do something like:
$result = @mysql_query($sql_query); // hide any errors
If (!$result) {
echo "Error: " . Mysql_error() . "<BR>";
}
On 2/20/01 2:57 AM this was written:
> ahhh... yes... :)
>
> the linux version is much stricter when it comes
> to table definitions...
>
> i had the same problem trying to declare an INDEX
> for my table too.... for linux, any key that
> you use as an INDEX on a table must be declared
> NOT NULL (whereas the win32 port doesnt seem
> to care very much)...
>
> for future reference, i reccomend trying out your
> SQL code in the MySQL monitor (the command line
> utility that comes with the server)... generally
> the error messages are *MUCH* more helpful
> than the ones i get via PHP
--
Thomas Deliduka
IT Manager
-------------------------
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/