Jump to content

elioncho

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

elioncho's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi. I need to check if a value is written correctly by the user. The value consists of numbers from 1-9 and two decimal places (optional). How can I write a pattern check for this? Thanks...
  2. Because I want that everytime a new year starts the count to begin at 1.
  3. HI, I have a table that looks something like this: CREATE TABLE orders(   ID            INT(5) AUTO_INCREMENT NOT NULL,   name        VARCHAR(40) NOT NULL,   date        DATE NOT NULL, PRIMARY KEY(ID,date) ) I want to change the value of ID to 1 again after certain time. What MySQL query can I use to make the field ID begin autoincrementing from number 1 again. Thanks..
  4. Hi, Suppose I have a table like this one ID      DATE            NAME 1    2006-10-03    ELIAS 2    2006-10-04    ELIAS 3    2006-04-07    JOHN I want the user to be able to do a search 'by month'  by selecting a month from a selection list. How can I compare the month the user chooses with the month in the DATE Format stored in the database? I there an esay way to compare the DATE format with a month? Thanks, Elías
  5. Ok Thanks for the help. I will use a Date and a number as primary keys. I there is a way that after a year has passed the number column begins again at 1...? Thanks
  6. Thanks for the help. The thing is that in the second table which is the number accompanied by the year: 1-06 2-06 3-06 . . . When 2006 is through it should begin by 1 again: 1-07 2-07 3-07 Do you have a link where I can read more about reference_ids. Thank you very much, Elías
  7. Hello. I want to know is there is a way of generating primary keys automtically when a new register of information is added to a table. I am currently doing a proyect where all the information is added with a secuential number. For example... Secuential Number(which will be the primary key), Firstname, Lastname... 1                                                                  John        Connor 2                                                                  Oscar      Wilde . . So the idea is that the user fills up the first and last names and then the info is saved on the database with a secuential number. How can I do this automatically. There is also another table where information will be added with a primary key that should consist of a secuential number and the year. For example: 1-06 2-06 3-06 . . . The thing is that when the year is over it should begin adding new information to the database from number one again but changing the year. Like this 1-07 2-07 3-07 . . . Any ideas please of how to do this. Thank you very much, Elías
×
×
  • 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.