Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,173 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
MySQL instructions #267832
05/26/09 12:36
05/26/09 12:36
Joined: May 2009
Posts: 445
Peine, Germany
Razoron Offline OP
Senior Member
Razoron  Offline OP
Senior Member

Joined: May 2009
Posts: 445
Peine, Germany
Hey guys,

does anybody know any mysql instructions to change some data for example in table accounts, column 5, row 19 too 29.
Is there any instruction?
And is it right that i can only use session_open and session_connect on Pro Edition for 850€ <.<?
I only buy commercial or extra edition for that.

Last edited by Razoron; 05/26/09 13:24.
Re: MySQL instructions [Re: Razoron] #267862
05/26/09 15:33
05/26/09 15:33
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
You can buy the extra edition or even use the free lite-c edition and buy my ANet Proffessional plugin. It offers you the possiblity to use http post. This way you can call a php script that does all the mysql stuff for you. This is more secure then the direct access to the database.

php is very easy and the syntax is almost the same. All you need to know is how you can connect with a mysql database and therefor you will only need 3-5 lines of code.

So if you use the lite-c free edition, the whole thing will cost you only 90€. And ANet additionally offers you much more multiplayer features like VoIP, FTP,... For more informations look into the link of my signature.


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: MySQL instructions [Re: Dark_samurai] #268079
05/27/09 12:25
05/27/09 12:25
Joined: May 2009
Posts: 445
Peine, Germany
Razoron Offline OP
Senior Member
Razoron  Offline OP
Senior Member

Joined: May 2009
Posts: 445
Peine, Germany
i know ftp and mmorpg dbs because i had already an mmorpg server^^
(Flyff p-server)
plugin sounds greate.
Do i only have to put anet.dll, anet and anet_h in the game directory and include them in my srcipt?
do i get with pro anet edition unlimited clients?
ich glaube wir können uns in deutsch unterhalten
i have only 30-day trial version from gs7.
does it only work on bought versions?
ftp is nice for patches, etc..

Last edited by Razoron; 05/27/09 15:17.
Re: MySQL instructions [Re: Razoron] #268239
05/28/09 09:57
05/28/09 09:57
Joined: Apr 2002
Posts: 117
Spain
Abstracto Offline
Member
Abstracto  Offline
Member

Joined: Apr 2002
Posts: 117
Spain
You can use anet.dll or any other dll if you use lite-c, i think.
anyway you will need to use a SQL sentence.
About SQL, read the mySQL manual, on the reference you can find UPDATE keyword, used to modify a row on the database.
You can do something like:

UPDATE tablename
SET column5_name= new_value
WHERE row_id BETWEEN 19 AND 29 ;

you should change tablename, column5_name, new_value for your database.
row_id is your primary key on this table, but you can change te condition to anything,
i hope this helps.





Last edited by Abstracto; 05/28/09 09:58.
Re: MySQL instructions [Re: Abstracto] #268306
05/28/09 15:33
05/28/09 15:33
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
@Razor:
ANet Pro allows you to use unlimited clients.
Yes, all you have to do is putting the plugin in your plugin_dir (see manual) and include the anet.h file.
The manual explains all the functions that are available. For starting with ANet, best would be to download the simple 3d chat tutorial.

Yes it should also work with the 30 days trail edition (but only the ANet Free version). The free version and all the information are available on my homepage (see signature).


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: MySQL instructions [Re: Dark_samurai] #268517
05/29/09 19:20
05/29/09 19:20
Joined: May 2009
Posts: 445
Peine, Germany
Razoron Offline OP
Senior Member
Razoron  Offline OP
Senior Member

Joined: May 2009
Posts: 445
Peine, Germany
when u could give me an example for:
1.Is the STRING*s in column name?
2.If not, create a new row with the string in column name.
3.If the string already exists, call a function.
4.Delete a row.
I'll think of buying pro version.

Re: MySQL instructions [Re: Razoron] #268657
05/30/09 13:54
05/30/09 13:54
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
With ANet it would work this way:
Lite-C+ANet:
Code:
http_init();
//Call add.php and overgive a string s with the content "Blabla"
http_post(_str("http://www.host.com/add.php"),_str("s=Blabla"));


add.php:
Code:
<?php
//Get the content of 's':
string_s = _POST['s'];
?>


Now you only need to do the mysql instructions. But I'm not an expert of php. Best would be to ask this question in a php forum.

Btw. if you need the mysql thing for an internet server list, ANet Pro offers you a ready made template with all php scripts, lite-c scripts and a "How to set up everything".


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: MySQL instructions [Re: Dark_samurai] #268662
05/30/09 14:29
05/30/09 14:29
Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
TSG_Torsten Offline

User
TSG_Torsten  Offline

User

Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
Hi,

it's easily to do something like this in php. As Dark_samurai already mentioned, you have to do an http_post instruction to call a php script.
You may also could use the bigdll from Timo Stark to call HTTP-GET request, I don't know what kind of requests ANet does send, may HTTP-POST request, that would be much better.

The script may could look like this:

add.php:
Code:
<?
mysql_connect("server_adress","user,"pw") or die("error, could not connect to mysql-server");
$search=$_GET["s"]; // get the searched query (if not, try $_POST)
$row_name="row"; // insert the row name, where to search
$table_name="table"; // Insert the table name
$link=mysql_query("SELECT * FROM $table_name WHERE $row_name LIKE '$search'");
if($link && $a=mysql_fetch_object($link)) // found!
echo "1"; // Give out 1, means the string is found
else
{
mysql_query("INSERT INTO $table_name VALUES ...");
echo "0"; // Give out 0, means the string was not found but was insert now
}
?>


btw., deleting looks like this:
Code:
mysql_query("DELETE FROM $table_name WHERE $row_name LIKE '$search'");


Regards
TSGames



Last edited by TSG_Torsten; 05/30/09 14:32.
Re: MySQL instructions [Re: TSG_Torsten] #268676
05/30/09 15:56
05/30/09 15:56
Joined: May 2009
Posts: 445
Peine, Germany
Razoron Offline OP
Senior Member
Razoron  Offline OP
Senior Member

Joined: May 2009
Posts: 445
Peine, Germany
i have to learn php then.
but i think it's easy to learn.
I think i'll buy it soon.
thx guys

Re: MySQL instructions [Re: Razoron] #268799
05/31/09 08:00
05/31/09 08:00
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
Yes, ANet uses a HTTP-Post request.


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Page 1 of 3 1 2 3

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1