User Profile
Collapse
-
Thanks, that helped me! -
Select from a different field depending on value of another field.
I want to select a column if data starts with a specific letter OR else to select from another column instead. Something like replacing columns.
For example:
1st row to read columns ID, NAME if name starts with an "a"
2nd row to read columns ID, NICKNAME because name doesn't start with an "a".
3rd row ID, NAME name starts with an "a"
and so on...
Thank yo... -
Because of many records I have in the database, it takes too long to bring results and most times it just crashes.
Question can be closed.
Thank you for your answers and your time.Leave a comment:
-
Thanks for your quick responses.
I am trying the way, you told me, but it doesn't work.
Maybe it's a database problem.Leave a comment:
-
[CODE=mysql]SELECT * Person.FullName , Person.BirthDat e, Person.Address
FROM Partners
INNER JOIN Person
ON Person.PartnerI D = Partners.Custom er and Person.BirthDat e > '1980-10-05'
where Partners.Produc er = '158'[/CODE]
That's the query. If I don't use the last line (where Partners.Produc er = '158'), it returns me results. But when I use a last where for any property of table Partners, the query just...Leave a comment:
-
Inner Join
I have two tables, table a and table b.
I do :
[CODE=mysql]select *
from a
inner join b
on b.some = a.something
where b.another = somevalue[/CODE]
How can I put another WHERE to sort my data but for an attribute from table a.
When I put it after the last WHERE it doesn't bring me any results.
Thanks
No activity results to display
Show More
Leave a comment: