[PHP-DB] Question about databases and foreign keys

2008-09-15 Thread Jason Pruim
Hi everyone, I just wanted to make sure that I am not making something more complicated then it has to be. I am working on a time clock application to use at my company, and so far, I have a login table, and with a foreign key that links to the time table. The thinking being, that when so

Re: [PHP-DB] Question about databases and foreign keys

2008-09-15 Thread Micah Gersten
Use 2 tables. You never know what the app might grow into and you should do it right the first time. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Jason Pruim wrote: > Hi everyone, > > I just wanted to make sure that I am not making something more > compli

Re: [PHP-DB] Question about databases and foreign keys

2008-09-15 Thread Jason Pruim
On Sep 15, 2008, at 10:59 AM, Micah Gersten wrote: Use 2 tables. You never know what the app might grow into and you should do it right the first time. That's what I was thinking too... Just wanted to hear it from someone else... NOW I get to learn about foreign keys and how to update thin

Re: [PHP-DB] Question about databases and foreign keys

2008-09-15 Thread Philip Thompson
On Sep 15, 2008, at 10:03 AM, Jason Pruim wrote: On Sep 15, 2008, at 10:59 AM, Micah Gersten wrote: Use 2 tables. You never know what the app might grow into and you should do it right the first time. That's what I was thinking too... Just wanted to hear it from someone else... NOW I get

[PHP-DB] Building WHERE SQL clauses

2008-09-15 Thread Mike Sullivan
Hello all. I'm using PHP to build a query for a database that consists of multiple tables, all with identical attribues. A typical syntax try looks like this: SELECT * FROM chico, harpo WHERE operator = "Bill" OR operator = "Jessica" MySQL responds with this: Couldn't execute query.Column '

Re: [PHP-DB] Building WHERE SQL clauses

2008-09-15 Thread Stephen Wellington
You probably want something like this: SELECT * FROM chico as c, harpo as h WHERE c.operator = "Bill" OR c.operator = "Jessica" OR h.operator = "Bill" OR h.operator ="Jessica" However if those tables really are identical I would suggest having a good look at your database design to see if it can

Re: [PHP-DB] Question about databases and foreign keys

2008-09-15 Thread Thodoris
On Sep 15, 2008, at 10:59 AM, Micah Gersten wrote: Use 2 tables. You never know what the app might grow into and you should do it right the first time. That's what I was thinking too... Just wanted to hear it from someone else... NOW I get to learn about foreign keys and how to update thi

[PHP-DB] PgCon.US: West registration now open

2008-09-15 Thread Joshua Drake
Registration for the second annual PostgreSQL Conference: West is now open!. You may register here: http://www.postgresqlconference.org/west08/register Once you have registered be sure to subscribe to the attendees list: http://lists.postgresqlconference.org/mailman/listinfo/attendees We have 2

Re: [PHP-DB] Question about databases and foreign keys

2008-09-15 Thread Micah Gersten
You'll actually want to have the User Id in the clocking table, not the other way around. User Id is the foreign key because it has a many to one relationship with the time logging. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Philip Thompson wrote: > > >

[PHP-DB] myphpadmin mcrypt and libmcrypt

2008-09-15 Thread Marc Fromm
I am configuring a Red Hat EL5 system. I need to install the packages mcrypt and libmcrypt for the myPHPadmin tool to access the MySQL databases. I recently learned that Red Hat does not provide packages at their repository to install third party packages like mcrypt and libmcrypt. The mcrypt s

Re: [PHP-DB] myphpadmin mcrypt and libmcrypt

2008-09-15 Thread Yakir Magriso
Hi. Did you try looking for a "php-mcrypt" RPM package? Regards, Yakir Magriso. On Mon, Sep 15, 2008 at 11:30 PM, Marc Fromm <[EMAIL PROTECTED]> wrote: > > I am configuring a Red Hat EL5 system. > I need to install the packages mcrypt and libmcrypt for the myPHPadmin tool > to access the MySQL

RE: [PHP-DB] myphpadmin mcrypt and libmcrypt

2008-09-15 Thread Marc Fromm
I'm finding some stuff, but since I cannot use yum with these rpms I don't know if I am getting all the dependencies correct and I am too new at this to know what all I need. Example of libmcrypt http://ftp.freshrpms.net/pub/freshrpms/redhat/testing/EL5/oracle/i386/

Re: [PHP-DB] Question about databases and foreign keys

2008-09-15 Thread Philip Thompson
On Sep 15, 2008, at 2:12 PM, Micah Gersten wrote: You'll actually want to have the User Id in the clocking table, not the other way around. User Id is the foreign key because it has a many to one relationship with the time logging. Thank you, Micah Gersten onShore Networks Internal Developer

Re: [PHP-DB] Building WHERE SQL clauses

2008-09-15 Thread Bastien Koert
On Mon, Sep 15, 2008 at 1:33 PM, Stephen Wellington < [EMAIL PROTECTED]> wrote: > You probably want something like this: > > SELECT * FROM chico as c, harpo as h WHERE c.operator = "Bill" OR > c.operator = > "Jessica" OR h.operator = "Bill" OR h.operator ="Jessica" > > However if those tables real

Re: [PHP-DB] Building WHERE SQL clauses

2008-09-15 Thread landavia
how about type like this SELECT * FROM chico c, harpo h WHERE c.operator = "Bill" OR c.operator = "Jessica" Mike Sullivan wrote: Hello all. I'm using PHP to build a query for a database that consists of multiple tables, all with identical attribues. A typical syntax try looks like this: