* Erumba Gotha Henri
> /*
>    $var="some long text"
>    or
>    $var='some long text'
> */

The kind of quoting used within PHP does not matter to mysql.

> if (!mysql_query("INSERT INTO table(field) VALUES($var)")) die("Always
> die");
>
> /*
>    1. MySQL doesn't insert the content of the variable $var into the field
> table wich is a VARCHAR type or TEXT type

You must quote string constants _within_ the SQL statement:

  mysql_query("INSERT INTO table(field) VALUES('$var')")

>    2. table contains other fields - type INT or VARCHAR or TEXT - but
> problems with or without other fields
>    3. no error report on errors logs (Apache, MySQL,EasyPHP)

This is not an error as seen from PHP or Apache. To check the error from
mysql, you can use the mysql_error() function:

<URL: http://www.php.net/manual/en/function.mysql-error.php >

--
Roger


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to