I'm wondering how I could fetch certain info out of two tables (with one command).
Can you provide me with some code? Thanks alot.
Hi! I am having an example code of a project that I'm currently setting up. This would get data out of the tables zip and userdata. SELECT * FROM zip,userdata WHERE zip.id = userdata.zipid
And how do I get one single row of a DB table? Let's say, I only want to let display userdata where id=$id.
Any ideas?
You can also look at a decent SQL-course. One can find it on
www.postgresql.org www.webmonkey.com
Include an AND statement
SELECT * FROM zip,userdata WHERE zip.id = userdata.zipid AND id = '$id'
But, you would realy want to read an sql-course!
NightOwl www.de-bruyne.org
I discovered that if I use this code the table "zip" MUST contain a row which is equal to userdata's zipid. Otherwise it won't display anything. Well, actually this is not I've thought to achieve...
There must be another solution other than using AND's
Thanks for any advice.
If you're using postgres and compiled it yourself, you should have a bunch of docs in the source directory, and the tutorial is, in the words of CM Burns "excellent..."