Jump to content

coolex

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

coolex's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello! I try to insert times into my database. I created a time field in a table and want to enter AM/PM time into it. For example "insert into test(time) values('10:00:00 PM');" After that I want to view my table: "select time_format(time, '%r') from test;" I get this time (10:00:00) not as PM but always as AM. But I want it as PM in my DB. How can I insert AM/PM time directly? PLease help! Thanks Alex
  2. Hello! I saw this MySQL Code in a PHP Script: CREATE TABLE `transaction` (   `ID` int(11) NOT NULL auto_increment,   `sourceID` int(11) NOT NULL default '0',   'comment' varchar(200),   PRIMARY KEY  (`UID`),   KEY `sourceID` (`sourceID`) ) I know what a Foreign Key is. But what does "KEY `sourceID` (`sourceID`)" mean? Is it something like a Foreign key? Hope you can help me. Thank you.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.