Select...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello List,

I'm having kind of trouble to get done this: Select data from a table,
except those data already in a second table. Actually,  if there is a rowid
in table2, I wont get it from table1, rowid is the key that relates both
tables.

I just can't express this with a SQL statement!! idequipomed is the key that
relates both tables!!
So, if idequipomed is already in Table2, I shouldn't get it from Table1.
Any suggestions?

Table1
Field        Type                 Null    Key     Default     Extra
Privileges
-----------  -------------------  ------  ------  ----------  --------------
  -------------------------------
idequipomed  tinyint(3) unsigned          PRI     (NULL)      auto_increment
select,insert,update,references
idcat        tinyint(3)                           0
select,insert,update,references
af           varchar(10)
select,insert,update,references
ns           varchar(10)
select,insert,update,references
depto        varchar(40)          YES             (NULL)
select,insert,update,references
zona         char(3)
select,insert,update,references
reqcal       char(1)              YES             1
select,insert,update,references
tipocal      char(1)
select,insert,update,references
estado       char(2)
select,insert,update,references
alta         date                                 0000-00-00
select,insert,update,references
ubicacion    varchar(15)                          0
select,insert,update,references

Table2
Field        Type                 Null    Key     Default  Extra
Privileges
-----------  -------------------  ------  ------  -------  --------------  -
------------------------------
calid        tinyint(4) unsigned          PRI     (NULL)   auto_increment
select,insert,update,references
idequipomed  tinyint(4) unsigned                  0
select,insert,update,references
faseid       tinyint(4) unsigned                  0
select,insert,update,references
ultimacal    date                 YES             (NULL)
select,insert,update,references
proxcal      date                 YES             (NULL)
select,insert,update,references
idcat        tinyint(4) unsigned                  0
select,insert,update,references


-----Original Message-----
From: Daniel Brown [mailto:parasane@xxxxxxxxx]
Sent: Lunes, 14 de Enero de 2008 01:55 p.m.
To: Miguel Guirao
Cc: php-db@xxxxxxxxxxxxx
Subject: Re:  md5() function


On Jan 14, 2008 2:26 PM, Miguel Guirao <miguel.guirao@xxxxxxxxxxxxxxx>
wrote:
> Hi!!
>
> I'm using the md5() function to encrypt a password and store it into a
> database. Now I want to retrieve that MD5 password and convert it into
it's
> human readable condition.
> Is there a function opposite to md5()??

    Negative.  Once it's hashed with an MD5, SHA1, or similar
encryption method, it's (as of now) impossible to reverse.  You could
create a table with a column of unencrypted phrases, characters, and
combinations, with a second column containing the correlating hashed
string, but that's about it.

--
</Dan>

Daniel P. Brown
Senior Unix Geek and #1 Rated "Year's Coolest Guy" By Self Since
Nineteen-Seventy-[mumble].

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux