Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [MySQL][SQL]Dziwne zapytanie
viamarimar
post
Post #1





Grupa: Zarejestrowani
Postów: 303
Pomógł: 1
Dołączył: 24.09.2011

Ostrzeżenie: (10%)
X----


wedlug mnie jest teoretycznie poprawnie a wywala blad

  1. DELETE FROM wpl_users JOIN wpl_dane ON wpl_dane.dane_users_id = wpl_users.users_id WHERE wpl_users.users_id=2



#1064 - 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 'JOIN wpl_dane ON wpl_dane.dane_users_id = wpl_users.users_id WHERE wpl_users.us' at line 1

Ten post edytował viamarimar 27.02.2015, 19:08:57
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
viamarimar
post
Post #2





Grupa: Zarejestrowani
Postów: 303
Pomógł: 1
Dołączył: 24.09.2011

Ostrzeżenie: (10%)
X----


coz... tylko nie wiem co by tu wiecej pokazac

  1. echo'<td><a href="admin.php?s=user&a=usun&id='.$r['users_id'].'" onclick="return confirm(\'Czy na pewno usunąć?\')" ><img src="images/kosz-icon.png" alt="Usuń" /></a></td>';


  1. if(isset($_GET['s']) && $_GET['s']=='user' && isset($_GET['a']) && $_GET['a']=='usun' && isset($_GET['id'])){
  2.  
  3. $id=$_GET['id'];
  4. $zap2 = ("DELETE FROM ".$prefix."users JOIN ".$prefix."dane ON ".$prefix."dane.dane_users_id = ".$prefix."users.users_id WHERE ".$prefix."users.users_id='$id'") or die(mysql_error());
  5. $result=mysql_query($zap2);
  6.  
  7.  
  8.  
  9. #header("location: admin.php?ak=usun");
  10. }


Ten post edytował viamarimar 27.02.2015, 20:03:59
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: 3.10.2025 - 01:51