Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [MySQL] UPDATE
Enikc
post
Post #1





Grupa: Zarejestrowani
Postów: 26
Pomógł: 0
Dołączył: 8.01.2015

Ostrzeżenie: (0%)
-----


Maunal:
  1. UPDATE
  2. TABLE
  3. SET
  4. TABLE.col1 = other_table.col1,
  5. TABLE.col2 = other_table.col2
  6. FROM
  7. TABLE
  8. INNER JOIN
  9. other_table
  10. ON
  11. TABLE.id = other_table.id


Moje wypociny:
  1. UPDATE oc_product
  2. SET oc_product.tax_class_id =0
  3. JOIN oc_product_to_manufacturer
  4. ON oc_product_to_manufacturer.product_id = oc_product.product_id
  5. WHERE oc_product_to_manufacturer.manufacturer_id =7
  6. AND oc_product.tax_class_id =9
  7. AND oc_product.price > 47.9


gdzie popelnilem blad?


Ten post edytował Enikc 13.03.2015, 15:28:01
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
pasman
post
Post #2





Grupa: Zarejestrowani
Postów: 70
Pomógł: 4
Dołączył: 16.03.2012

Ostrzeżenie: (0%)
-----


Cytat(Enikc @ 13.03.2015, 15:26:36 ) *
gdzie popelnilem blad?



wczytaj się dokładniej w manual, jest tam napisane zupełnie co innego:

  1. UPDATE [LOW_PRIORITY] [IGNORE] table_references
  2. SET col_name1={expr1|DEFAULT} [, col_name2={expr2|DEFAULT}] ...
  3. [WHERE where_condition]



swoją drogą skąd wziąłeś to co opisałeś jako "manual" ?

Ten post edytował pasman 13.03.2015, 16:54:06
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 8.10.2025 - 20:17