Forum: MySQL Oct 2nd, 2009 |
| Replies: 3 Views: 534 I do not know if this can help you, but if you have a date field which you can order by desc, then you can use Top 1 something like this.
Select top 1 Field1
from table1
order by datefield desc... |
Forum: MySQL Jul 23rd, 2009 |
| Replies: 1 Views: 261 The only thing i can see is, I know the fact that it is an anonymous mobile message board, but if in the future you expect to open the software to Non anonymous only, I would say make another table... |
Forum: MySQL Jul 21st, 2009 |
| Replies: 3 Views: 255 |
Forum: MySQL Jul 21st, 2009 |
| Replies: 1 Views: 226 In the first select statement, into the where clause after names.contact_id you have a "," that is wrong. |
Forum: MySQL Jul 21st, 2009 |
| Replies: 3 Views: 255 I do not see any benefit creating another table,
First you are retrieving a specific value without any join or combined statement. In the other hand you right if you retrieve smaller record you... |
Forum: MySQL Jun 23rd, 2009 |
| Replies: 9 Views: 737 Glad to know that, take care. |
Forum: MySQL Jun 23rd, 2009 |
| Replies: 9 Views: 737 ok so your statement should be like this.
regards. |
Forum: MySQL Jun 22nd, 2009 |
| Replies: 9 Views: 737 Ok, I think I am a little lost lets put some data into that table
COUNTRIES
USA - UNITED STATES
DR - DOMINICAN REPUBLIC
MX - MEXICO
PR - PUERTO RICO
ALLOW
DR
MX |
Forum: MySQL Jun 22nd, 2009 |
| Replies: 9 Views: 737 |
Forum: MySQL Jun 22nd, 2009 |
| Replies: 9 Views: 737 try this.
SELECT DISTINCT countries.Country_Code, Country_Name FROM countries, allow WHERE countries.Country_Code != allow.Country_Code ORDER BY Country_Name
Regards. |
Forum: MySQL Jun 19th, 2009 |
| Replies: 2 Views: 711 Try that
SELECT Profiles.answer, users.gender, COUNT(Profiles.answer) AS count
FROM Profiles INNER JOIN
users ON users.userid = Profiles.userid
GROUP BY... |
Forum: MySQL May 29th, 2009 |
| Replies: 3 Views: 439 Try to repost your select statement between tags because I cannot even seen it. |
Forum: MySQL May 21st, 2009 |
| Replies: 1 Views: 454 I think you can do that.
$Statement = "Select * from profile where age between " . $age_from . "and " . $age_to."; |