![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 41 Pomógł: 0 Dołączył: 26.12.2011 Ostrzeżenie: (0%) ![]() ![]() |
Witam, wykonuję sobie proste zapytanie:
CODE SET @rownum := 0; SELECT * FROM (SELECT @rownum := @rownum+1 AS rank, id, score FROM profiles ORDER BY score DESC) AS derived_table Które daje prawidłowe wyniki w PhpMyAdmin. Ale już w PHP przy użyciu mysql_query daje oto taki efekt: CODE You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * FROM (SELECT @rownum := @rownum+1 AS rank, id, score FROM profiles ORDE' at line 1 Jak widać mysql_query urżnął zapytanie. O.o Skąd takie cuda? Ten post edytował blady101 13.03.2012, 14:37:55 |
|
|
![]() ![]() |
![]() |
Aktualny czas: 15.09.2025 - 10:43 |