|
|
|
(PHP) syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
|
|||
|---|---|---|---|
|
#18+
Все работало, после добавления order by выдает ошибку, помогите пожалуйста public function getProductLensTypes($product_id, $show_single_vivsion = false) { $aResult = $this->db->query("SELECT * FROM lens_product_types,lens_types WHERE lens_product_types.lens_type_id=lens_types.lens_type_id AND product_id=" . (int)$product_id "order by lens_types.lens_type_id desc" )->rows; ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.03.2012, 13:42:58 |
|
||
|
(PHP) syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
|
|||
|---|---|---|---|
|
#18+
Пропущена точка после (int)$product_id ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.03.2012, 13:46:01 |
|
||
|
(PHP) syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
|
|||
|---|---|---|---|
|
#18+
спасибо, теперь работает, но не совсем так как надо( ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.03.2012, 13:49:35 |
|
||
|
(PHP) syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
|
|||
|---|---|---|---|
|
#18+
hotternспасибо, теперь работает, но не совсем так как надо( а еще не хватате пробела перед order ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.03.2012, 13:53:45 |
|
||
|
(PHP) syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
|
|||
|---|---|---|---|
|
#18+
hotternне совсем так как надо(А надо по алфавиту? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.03.2012, 13:55:40 |
|
||
|
(PHP) syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
|
|||
|---|---|---|---|
|
#18+
нет, у меня сейчас выводит Bi-Focal Progressive Single Vision , а мне надо Single Vision Bi-Focal Progressive Код: php 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. Модератор: Пожалуйста, оформляйте код тегами SRC ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.03.2012, 13:58:46 |
|
||
|
(PHP) syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
|
|||
|---|---|---|---|
|
#18+
а как здесь редактировать сообщение ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.03.2012, 14:12:22 |
|
||
|
(PHP) syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
|
|||
|---|---|---|---|
|
#18+
vkle, мне нужно в массив сначала заносить запись с single vision? что-т никак не получается( ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.03.2012, 14:21:59 |
|
||
|
(PHP) syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
|
|||
|---|---|---|---|
|
#18+
hotternа как здесь редактировать сообщениеНикак. Можно кликнуть "Сообщить модератору" и описать суть проблемы. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.03.2012, 15:31:33 |
|
||
|
(PHP) syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
|
|||
|---|---|---|---|
|
#18+
hotternмне нужно в массив сначала заносить запись с single vision?Чтобы решить какую задачу? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.03.2012, 15:35:23 |
|
||
|
(PHP) syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
|
|||
|---|---|---|---|
|
#18+
vkle, мне нужно отсортировать массив $aResult[], тоесть сейчас у меня в конец добавляется значение single vision или singe vision only, а мне надо чтоб оно было первым при выводе массива ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.03.2012, 17:32:48 |
|
||
|
(PHP) syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
|
|||
|---|---|---|---|
|
#18+
Так может быть добавлять его первым? Если все же не так, то покажите пример реальных данных (приложите таблички в несколько строк, лишние поля уберите) и желаемый результат. Есть подозрение, что вся эта муть с массивами не нужна. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.03.2012, 18:47:51 |
|
||
|
(PHP) syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
|
|||
|---|---|---|---|
|
#18+
vkleТак может быть добавлять его первым?Или реверснуть массив перед выдачей... ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.03.2012, 18:48:51 |
|
||
|
(PHP) syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
|
|||
|---|---|---|---|
|
#18+
vkle, а как его реверснуть? я посмотрела вардампом, вот значение массива array(1) { [1]=> array(2) { ["lens_type_id"]=> string(2) "-1" ["name"]=> string(18) "Single Vision only" } } array(1) { [2]=> array(2) { ["lens_type_id"]=> string(2) "-1" ["name"]=> string(18) "Single Vision only" } } array(0) { } array(2) { [0]=> array(27) { ["product_id"]=> string(2) "81" ["lens_type_id"]=> string(4) "1792" ["name"]=> string(11) "Progressive" ["configurable"]=> string(1) "1" ["sr_from"]=> string(6) "-10.00" ["sr_to"]=> string(5) "10.00" ["sr_step"]=> string(4) "0.50" ["sr_zero"]=> string(5) "plano" ["sr_useplus"]=> string(1) "1" ["cr_from"]=> string(5) "-3.00" ["cr_to"]=> string(4) "3.00" ["cr_step"]=> string(4) "0.50" ["cr_zero"]=> string(4) "none" ["cr_useplus"]=> string(1) "1" ["ar_from"]=> string(4) "0.00" ["ar_to"]=> string(4) "3.00" ["ar_step"]=> string(4) "0.50" ["ar_zero"]=> string(4) "none" ["ar_useplus"]=> string(1) "1" ["ax_from"]=> string(4) "0.00" ["ax_to"]=> string(6) "180.00" ["ax_step"]=> string(4) "1.00" ["ax_zero"]=> string(4) "none" ["pd_from"]=> string(5) "50.00" ["pd_to"]=> string(5) "75.00" ["pd_step"]=> string(4) "0.50" ["pd_zero"]=> string(2) "65" } [2]=> array(2) { ["lens_type_id"]=> string(2) "-1" ["name"]=> string(18) "Single Vision only" } } array(2) { [0]=> array(27) { ["product_id"]=> string(2) "65" ["lens_type_id"]=> string(4) "1792" ["name"]=> string(11) "Progressive" ["configurable"]=> string(1) "1" ["sr_from"]=> string(6) "-10.00" ["sr_to"]=> string(5) "10.00" ["sr_step"]=> string(4) "0.50" ["sr_zero"]=> string(5) "plano" ["sr_useplus"]=> string(1) "1" ["cr_from"]=> string(5) "-3.00" ["cr_to"]=> string(4) "3.00" ["cr_step"]=> string(4) "0.50" ["cr_zero"]=> string(4) "none" ["cr_useplus"]=> string(1) "1" ["ar_from"]=> string(4) "0.00" ["ar_to"]=> string(4) "3.00" ["ar_step"]=> string(4) "0.50" ["ar_zero"]=> string(4) "none" ["ar_useplus"]=> string(1) "1" ["ax_from"]=> string(4) "0.00" ["ax_to"]=> string(6) "180.00" ["ax_step"]=> string(4) "1.00" ["ax_zero"]=> string(4) "none" ["pd_from"]=> string(5) "50.00" ["pd_to"]=> string(5) "75.00" ["pd_step"]=> string(4) "0.50" ["pd_zero"]=> string(2) "65" } [2]=> array(2) { ["lens_type_id"]=> string(2) "-1" ["name"]=> string(18) "Single Vision only" } } array(1) { [1]=> array(2) { ["lens_type_id"]=> string(2) "-1" ["name"]=> string(18) "Single Vision only" } } array(3) { [0]=> array(27) { ["product_id"]=> string(2) "63" ["lens_type_id"]=> string(4) "1793" ["name"]=> string(8) "Bi-Focal" ["configurable"]=> string(1) "1" ["sr_from"]=> string(6) "-10.00" ["sr_to"]=> string(5) "10.00" ["sr_step"]=> string(4) "1.00" ["sr_zero"]=> string(1) "0" ["sr_useplus"]=> string(1) "0" ["cr_from"]=> string(4) "0.00" ["cr_to"]=> string(4) "0.00" ["cr_step"]=> string(4) "0.00" ["cr_zero"]=> string(1) "0" ["cr_useplus"]=> string(1) "0" ["ar_from"]=> string(4) "0.00" ["ar_to"]=> string(4) "0.00" ["ar_step"]=> string(4) "0.00" ["ar_zero"]=> string(1) "0" ["ar_useplus"]=> string(1) "0" ["ax_from"]=> string(4) "0.00" ["ax_to"]=> string(4) "0.00" ["ax_step"]=> string(4) "0.00" ["ax_zero"]=> string(1) "0" ["pd_from"]=> string(4) "0.00" ["pd_to"]=> string(4) "0.00" ["pd_step"]=> string(4) "0.00" ["pd_zero"]=> string(1) "0" } [1]=> array(27) { ["product_id"]=> string(2) "63" ["lens_type_id"]=> string(4) "1792" ["name"]=> string(11) "Progressive" ["configurable"]=> string(1) "1" ["sr_from"]=> string(6) "-10.00" ["sr_to"]=> string(5) "10.00" ["sr_step"]=> string(4) "0.50" ["sr_zero"]=> string(5) "plano" ["sr_useplus"]=> string(1) "1" ["cr_from"]=> string(5) "-3.00" ["cr_to"]=> string(4) "3.00" ["cr_step"]=> string(4) "0.50" ["cr_zero"]=> string(4) "none" ["cr_useplus"]=> string(1) "1" ["ar_from"]=> string(4) "0.00" ["ar_to"]=> string(4) "3.00" ["ar_step"]=> string(4) "0.50" ["ar_zero"]=> string(4) "none" ["ar_useplus"]=> string(1) "1" ["ax_from"]=> string(4) "0.00" ["ax_to"]=> string(6) "180.00" ["ax_step"]=> string(4) "1.00" ["ax_zero"]=> string(4) "none" ["pd_from"]=> string(5) "50.00" ["pd_to"]=> string(5) "75.00" ["pd_step"]=> string(4) "0.50" ["pd_zero"]=> string(2) "65" } [2]=> array(2) { ["lens_type_id"]=> string(2) "-1" ["name"]=> string(13) "Single Vision" } } array(1) { [1]=> array(2) { ["lens_type_id"]=> string(2) "-1" ["name"]=> string(18) "Single Vision only" } } ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.03.2012, 19:24:52 |
|
||
|
(PHP) syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
|
|||
|---|---|---|---|
|
#18+
hottern, Не знаю как у Вас, а у меня сегодня к вечеру встроенный в моск процессор не в состоянии разобрать эту кучу чего-то. Можно ж было исходный код скопипастить и под тег src или fix засунуть.... Попробуйте array_reverse() , чтоли... ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.03.2012, 20:58:08 |
|
||
|
(PHP) syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
|
|||
|---|---|---|---|
|
#18+
спасибо большое, я уж думала у меня ничего не получится. Теперь все правильно работает) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.03.2012, 22:33:08 |
|
||
|
|

start [/forum/topic.php?fid=23&msg=37725353&tid=1465354]: |
0ms |
get settings: |
7ms |
get forum list: |
19ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
58ms |
get topic data: |
11ms |
get forum data: |
2ms |
get page messages: |
72ms |
get tp. blocked users: |
2ms |
| others: | 195ms |
| total: | 372ms |

| 0 / 0 |
