Jump to content

claudiofranck

New Members
  • Posts

    2
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

claudiofranck's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. All you would need to is get current value on the language you are programming, substract the hours filed in the form, very that the number is not negative and do an update query update table set timefield = 'variable from your language'; That should do it is much easier that kind of process on the client. If you tell me what language your are using I might be able to help out more
  2. Mysql version 5.0.37 Table: 'refsub', 'CREATE TABLE `refsub` ( `PROJET` char(10) NOT NULL, `SUBSECTO` char(10) NOT NULL, UNIQUE KEY `K_REFSUB` (`PROJET`,`SUBSECTO`), KEY `PROJET` (`PROJET`), KEY `SUBSECTO` (`SUBSECTO`), CONSTRAINT `FK_REFSUB_REFCHIF` FOREIGN KEY (`PROJET`) REFERENCES `refchif` (`PROJET`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `FK_REFSUB_SUBSECTO` FOREIGN KEY (`SUBSECTO`) REFERENCES `subsecto` (`SUBSECTO`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8' This a table that basicaly links a project number with the sector it is invlved with so I only store the primary keys of each, a project can have multiple sectors and of course a sector can belong to multple projects. What I need to do is basically get projects numbers that have 2 or more of the sectors, i.e. prject 1234 had electric and mechanic sectors, project 4567 had also electric and mechanic and maybe others I want to search all projects that have mechanic and electric sectors SELECT * FROM refsub where subsecto like 'electric' and subsecto like 'mechanic'; This query returns no results, using 'or' works, 'and' get's me nothing. Any ideas? Thank you very much
×
×
  • 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.