Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[pytanie]autoit + mysql


tapne

Rekomendowane odpowiedzi

Opublikowano

Witam. Chciałbym się dowiedzieć jak korzystać w autoicie z mysql, widziałem poradnik HeniutX_PL, ale szczerze powiem że chujowy i nic nie rozumiem xD

 

Za pomoc oczywiście lajk + max w profilu : )

Opublikowano

Tutaj masz UDF'a : http://www.autoitscript.com/forum/topic/20814-mysql-udfs/

 

Funkcje:

_MySQLConnect()
Open a connection to the specified Database

_MySQLEnd()
Close the connection (read notes!)

_AddRecord()
Adds a record to a specified table

_DeleteRecord()
Deletes a record from the specifed table.

_Query()
Execute a query to the database

_CreateTable()
Adds a table to the database

_CreateColumn()
Adds a column to the given table

_DropCol()
Deletes a column from the given table

_DropTbl()
Deletes a table from the given DB

_CountRecords()
Counts the number of records in the given column

_CountTables()
Counts the number of tables in the database

_GetColNames()
Gets the names of all the columns in the given table

_GetTblNames()
Gets the names of all the tables in the database

_GetColvals()
Gets all of the values of the specified column

_GetColType()
Gets the DATA TYPE of the specified column

_GetColCount()
Gets a count of all columns in the specified table

_MySQLTableExists()
Find out whether or not a specified table exists

_GetDBNames()
Get a list & count of databases on the current server.

_ChangeCon()
Change your connection string.

Opublikowano

trzeba to jakoś instalować albo cuś bo nie wiem do czego ten drugi programik, bo read me jest niejasne :P

PS zajebista sygna xD

Opublikowano

tutoriali nie czytasz ? to znajdź ten o UDF , o msql jest czytelny a ty jak widać nawet nie masz kompletnego pojęcia o tym ze trzeba dysponować własna baza danych albo przynajmniej taką do której zna się hasło i login

 

reszta, no cóż dokładnie opisana w UDF jest niestety po angielsku

If you = stupid then

insert(foot.in.your.ass)

end if

licznik-54-96732-stat.png

Opublikowano

no we nie gadaj głupot -.-, nie wiedziałem jak "wgrać" ten mysql.au3 i tyle ; )

// no i nadał nie działa

#include <mysql.au3>
$conn = _MySQLConnect("db625243", "XX", "db625243", "mysql1.ugu.pl")
_createtable($conn, "users", "login")

 

mam zainstalowane to cuś:

http://dev.mysql.com/downloads/connector/odbc/3.51.html

oraz w include wrzucone mysql.au3

http://www.autoitscript.com/forum/topic/20814-mysql-udfs/

 

to w czym problem ?

Opublikowano

że czegoś ci brak ... połączenia

dla przykładu

#include <MySQL.au3>

Global $oSQL, $Input1, $Input2

#cs
; gui se zrób sam, tak dla sprawdzenia siebie 
#ce

While 1
Switch GUIGetMsg()
	Case $GUI_EVENT_CLOSE
		Exit
	Case $Button1

		_Connect()

		$sQuery = 'SELECT * FROM *'
	 $sReturn = _SQL($sQuery)
		MsgBox(0,'SQL',$sReturn)
EndSwitch
WEnd

Func _Connect()
$sUsername = GUICtrlRead($Input1) ;zamiast readów mozesz wpisać w ''
$sPassword = GUICtrlRead($Input2)
$sDatabase = '' ;nazwa bazy
$sServer = '' ; IP serwera
$oSQL= _MySQLConnect($sUsername, $sPassword, $sDatabase, $sServer)
EndFunc

Func _SQL($SQLCode,$sDelimiter='|')
$Return = ''
$TableContents = _Query ($oSQL, $SQLCode)
With $TableContents
	While Not .EOF
		For $i=0 To .Fields.Count-1
			$Return &= $sDelimiter &.Fields ($i).value
		Next
		.MoveNext
	WEnd
	$Return = StringTrimLeft($Return,1)
EndWith
Return $Return
EndFunc

 

 

If you = stupid then

insert(foot.in.your.ass)

end if

licznik-54-96732-stat.png

Opublikowano

mam taką luźną sugestię żebyś najpierw nauczył się programować czegoś prostego w autoIT, oraz ogarnął składnie i błędy w MySQL a dopiero potem brał się za programy łączące z bazą ;p Generalnie nie stosuje się połączeń bezpośrednich z au3 do mysql bo łatwo zdekompilować program i wykraść dane. Poza tym jeśli Ci to potrzebne do hacka (bo coś mi się tak zdaje) to nie radzę Ci tu pisać bo "hackierom" nie pomagamy.

 

@down

spox, upewniam się tylko ;p

exKVR.png

c++, c++/cli, php, js, css3, lua, au3 and others...

 

Pomoc dla newbich w wymienionych wyżej językach, pisanie botów do Tibii - pisz na gg, może się dogadamy :)

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...