Before executing the query, Just check that string whether it is null or
not.
here is the simple example.
<?PHP
$text = "tThese are a few words :) ... ";
$data=trim($text);
if($data!=""){
//execute your sql code here
}
?>
Please let me know if you still have this kind of problem
On 1/25/06, udenihc01 <[EMAIL PROTECTED]> wrote:
>
> Hi,
> My name is Chinedu and I'm working as a Junior DBA in MTEL, Nigeria.
> I'm trying to create a small database using MySQL but I'm
> experiencing a problem which I belive could have been taken care of
> with a NOT NULL constraint.
> I created a table with MySQL (INNODB) and a form using PHP to insert
> values into the underlying table.
> I set some columns in the table to NOT NULL but I noticed that when I
> left those NOT NULL fields blank, the insert operation still worked;
> thereby inserting empty strings in the NOT NULL columns.
> Please, how do I make my table reject those empty strings at the
> database and form level? I would be glad if you can help me out with
> this bug.
>
> Chinedu.
>
>
>
>
>
>
>
>
> The php_mysql group is dedicated to learn more about the PHP/MySQL web
> database possibilities through group learning.
>
>
> ------------------------------
> YAHOO! GROUPS LINKS
>
>
> - Visit your group "php_mysql<http://groups.yahoo.com/group/php_mysql>"
> on the web.
>
> - To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]<[EMAIL PROTECTED]>
>
> - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/>.
>
>
> ------------------------------
>
--
Regards,
Ramesh
'Desire is not the theme of my Life; Life is the theme of my desire'
[Non-text portions of this message have been removed]
The php_mysql group is dedicated to learn more about the PHP/MySQL web database
possibilities through group learning.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php_mysql/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/