SQL doğrulama!

0 Cevap php

Ben bu yüzden bu aptal bir soru olabilir SQL oldukça yeni ...

Benim SQL tablosu birkaç alanları doldurur PHP bir form var. Bu kodu vardır:

$sql="INSERT INTO $tbl_name
(app_name, app_path, short_desc, full_desc)
VALUES ('$_POST[app_name]', '$_POST[app_path]',
'$_POST[short_desc]', '$_POST[full_desc]')";

Şeklinde bu alanlarda hiçbir metin Ama eğer bile app_name ve app_path null sütunlar DEĞİLDİR, sorgu idam edilebilir.

Yani, benim soru:

How to stop the execution of the query if there is no text in the NOT NULL fields ?

0 Cevap