AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

IF NOT EXIST abfrage mit MySQL

Ein Thema von milos · begonnen am 2. Feb 2009 · letzter Beitrag vom 2. Feb 2009
 
Benutzerbild von milos
milos

Registriert seit: 14. Jul 2008
Ort: Bern (CH)
508 Beiträge
 
Delphi 11 Alexandria
 
#1

IF NOT EXIST abfrage mit MySQL

  Alt 2. Feb 2009, 11:24
Hallo Wenn ihr euch fragt warum ich immer euch frage, der Grund ist: Ihr seit die beste Hilfe.
Da ich nun ein Bot mache, muss ich ja auch auswählen können welchen Spieler er spielt! Doch falls der Spielername nicht existiert, soll der Spieler erstellt werden. Für das brauche ich IF NOT EXISTS

Doch mein Proble ist, es wird nicht ausgeführt. Liegt es am SQL code?
Ach ja das ganze wird in PHP ausgeführt.

Code:
mysql_query("INSERT INTO IF NOT EXISTS ´username´ = $botname `users` (`id`,

`username`, `password`, `banned`, `villages`, `points`, `ennobled_by`, `ally`,

`ally_titel`, `ally_found`, `ally_lead`, `ally_invite`, `ally_diplomacy`,

`ally_mass_mail`, `rang`, `villages_mode`, `attacks`, `new_report`, `new_mail`,

`market_sell`, `market_buy`, `market_ratio_max`, `killed_units_att`,

`killed_units_att_rank`, `killed_units_def`, `killed_units_def_rank`,

`killed_units_altogether`, `killed_units_altogether_rank`, `do_action`,

`last_activity`, `birthday`, `vacation_id`, `vacation_name`, `vacation_accept`,

`b_day`, `b_month`, `b_year`, `sex`, `home`, `image`, `personal_text`, `window_width`,

`show_toolbar`, `dyn_menu`, `confirm_queue`, `map_size`, `memo`, `map_reload`,

`graphical_overwiev`, `overview`, `stufen`, `winter`) VALUES (NULL, '$botname',

'e10adc3949ba59abbe56e057f20f883e', 'N', '', '', '', '-1', '', '0', '0', '0', '0',

'0', '', 'prod', '0', '0', '0', 'all', 'all', '3', '', '', '', '', '', '', '', '', '',

'-1', '', '0', '', '', '', 'x', '', '', '', '840', '1', '1', '1', '9', '', '', '1',

'new', 'yes', '');'1', '1', '1', '9', '', '', '1', 'new', 'yes', '');");
Milos
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 20:22 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz