Jump to content
php.lv forumi

datums, ja datubāze ir DATE


yeahz

Recommended Posts

Datubāzē kolonnas tips DATE (0000-00-00)

Pievienoju šādā veidā:

        $year = quote_smart($_POST['year']);
       $month = quote_smart($_POST['month']);
       $day = quote_smart($_POST['day']);
       $date = $year . '-' . $month . '-' . $day;

vienmēr no $date iznāks šāds formāts - 1992-04-09

kāpēc pievienojot querijā datums nepievienojas? datubāzē ir 0000-00-00 nevis 1992-04-09 (datums, protams, var būt jebkāds)

Citi dati vienā un tajā pašā querijā pievienojas veiksmīgi.

 

 

atrisināju pats :D

vajadzēja pievienot '' querijā.

Edited by yeahz
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...