Joseph Bueno wrote:
Zach wrote:
I am writing a shell script using Born Shell. I am trying to get the
result of a SQL statement into a variable.
For example:
/usr/bin/mysql -uroot -prootpass BOB << EOF
SELECT * FROM Bobstable WHERE Name=1
EOF
How do I get the result into a variable?
But this is mor
Ah, I see what you mean, I misunderstood before. In this case, I would
tend to reevaluate my table structure since you're inherently giving a
key (colorID) more than one possible value (1 or 2) at the same time.
There could be something you could do with DISTINCT but I can't think
exactly how
danchik wrote:
coming back to my earlier question but much more simplified portion of it :)
I the following table :
theTable
---
ID | int (key)
colorID | int
itemID | int
---
how do I select all itemIDs that have colorID = 1