AGB  ·  Datenschutz  ·  Impressum  







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

Delphi and phpmyadmin?

Ein Thema von pastra · begonnen am 17. Jul 2006 · letzter Beitrag vom 17. Jul 2006
Antwort Antwort
pastra

Registriert seit: 23. Jun 2006
21 Beiträge
 
#1

Delphi and phpmyadmin?

  Alt 17. Jul 2006, 13:46
Hi!

I was wondering: How can I create a function i delphi to:

-Connect to my: phpmyadmin
-Enter my password and username
-loop all records in a speciffic table to see if my ip is allready in the table (If not then ADD)
-Delete by uniqe ID function


Is it posible from delphi?


If so, it need to bee as small as posible...


I look forward to hear some great idears on how to acomplise this.. ( or just a few hints )


Thanks in advance!


Cheers!
  Mit Zitat antworten Zitat
Benutzerbild von Phoenix
Phoenix
(Moderator)

Registriert seit: 25. Jun 2002
Ort: Hausach
7.641 Beiträge
 
#2

Re: Delphi and phpmyadmin?

  Alt 17. Jul 2006, 13:55
Hi,

well.. look at the Indy components. The Idhttp component should be able to do all what you want.
In short, it is to build the initial http - Request to get the login-form from the server, then you can fill out the controls (username, password) and send a login-request. After that you need to put all the steps you would manually do in myphpadmin into code handling the answers from the idhttp component.

I guess we have some hints here in the forum, but I fear all in german.
Sebastian Gingter
Phoenix - 不死鳥, Microsoft MVP, Rettungshundeführer
Über mich: Sebastian Gingter @ Thinktecture Mein Blog: https://gingter.org
  Mit Zitat antworten Zitat
Benutzerbild von 3_of_8
3_of_8

Registriert seit: 22. Mär 2005
Ort: Dingolfing
4.129 Beiträge
 
Turbo Delphi für Win32
 
#3

Re: Delphi and phpmyadmin?

  Alt 17. Jul 2006, 13:55
Yes, it is. Take a look at the Indy Components. (Google helps)

But this is a long way round, so you should either try to connect directly to the database or you use a simple PHP Script with GET-parameters to do what you want to do.
Manuel Eberl
„The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.“
- Terry Pratchett
  Mit Zitat antworten Zitat
pastra

Registriert seit: 23. Jun 2006
21 Beiträge
 
#4

Re: Delphi and phpmyadmin?

  Alt 17. Jul 2006, 13:59
Zitat von 3_of_8:
Yes, it is. Take a look at the Indy Components. (Google helps)

But this is a long way round, so you should either try to connect directly to the database or you use a simple PHP Script with GET-parameters to do what you want to do.

how would i start out if I would like to try: "to connect directly to the database" ?


I guess my last post was miswritten, becous I do not want to connect to the phpmyadmin.. I only want to be albe to post data (insert delete set) in a table created BY phpmyadmin..


The Get/post with idhhtp I would rather awoid...


Is it posible to use some sql components or???


Thanks!
  Mit Zitat antworten Zitat
Benutzerbild von 3_of_8
3_of_8

Registriert seit: 22. Mär 2005
Ort: Dingolfing
4.129 Beiträge
 
Turbo Delphi für Win32
 
#5

Re: Delphi and phpmyadmin?

  Alt 17. Jul 2006, 14:03
It does not matter anyway how you did create those tables.

Well, at first you have to find out whether your database hoster supports direct connections to the database. If yes, you can use MySQL-Components you first have to find. (But there are several.)

Apart from that, there's no real possibility to establish a connection without those tricks like a PHP script or ASP and so on.
Manuel Eberl
„The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.“
- Terry Pratchett
  Mit Zitat antworten Zitat
Benutzerbild von Phoenix
Phoenix
(Moderator)

Registriert seit: 25. Jun 2002
Ort: Hausach
7.641 Beiträge
 
#6

Re: Delphi and phpmyadmin?

  Alt 17. Jul 2006, 14:07
That depends...

first of all, you need to check if you have remote access to that database at all (I guess it's mysql, right?). Most providers deny direct access to a hosted database from other computers than the webserver, that is for security reasons.

Have a google for MySQL Front. It's commercial software, but you can get a free trial version with which you can test remote access to that database. Try to connect to that database with mysql front, if you can connect, and if you can do the desired operations through mysql front, then the next step is to build that in your application. If you don't have remote access at all (perhaps contacting your provider could also help), your stuck with this possibility and need to use php to gain database access.

If you get a connection, have a look at the ZEOS components for direct database access.
Sebastian Gingter
Phoenix - 不死鳥, Microsoft MVP, Rettungshundeführer
Über mich: Sebastian Gingter @ Thinktecture Mein Blog: https://gingter.org
  Mit Zitat antworten Zitat
pastra

Registriert seit: 23. Jun 2006
21 Beiträge
 
#7

Re: Delphi and phpmyadmin?

  Alt 17. Jul 2006, 14:08
Zitat von 3_of_8:
It does not matter anyway how you did create those tables.

Well, at first you have to find out whether your database hoster supports direct connections to the database. If yes, you can use MySQL-Components you first have to find. (But there are several.)

Apart from that, there's no real possibility to establish a connection without those tricks like a PHP script or ASP and so on.

Okay, thank you for your fast reply, I will first try to find a MySQL-Component and see if It is posible for me to use that, second I'll try to set up an .asp page witch i can use idhttp to post to...


Thanks to ALL for there reply's


Cheers!
  Mit Zitat antworten Zitat
r2c2

Registriert seit: 9. Mai 2005
Ort: Nordbaden
925 Beiträge
 
#8

Re: Delphi and phpmyadmin?

  Alt 17. Jul 2006, 14:59
Zitat von pastra:
Okay, thank you for your fast reply, I will first try to find a MySQL-Component and see if It is posible for me to use that, second I'll try to set up an .asp page witch i can use idhttp to post to...
I would soggest another order:
1. download MySQL-QueryBrowser or MySQL-Administrator or another frontend of your choice
2. Try to connect with one of those programs
3a. if you can connect, you're lucky(not Luckie ) --> look for some DB-Components
3b. if you are not able to connect, you have to build up a kind of repeater-file in PHP or ASP or whatever your provoder supports --> send the query to the repeater-file which sends it to the database. The problem here could be security. You have to implement an authorization in order not to allow everybody to access your db.


Christian
Kaum macht man's richtig, schon klappts!
  Mit Zitat antworten Zitat
Antwort Antwort


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 18:23 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