Commit graph

8 commits

Author SHA1 Message Date
frozenblit
68a8214f7f Fix default parameter for mysql_query
Function expects an array, but was receiving an empty string
2016-10-26 02:11:39 +02:00
turley
764e983d98 more lineendings
again blame bodom
2016-02-12 00:06:07 +01:00
Gabriele Tozzi
45dc8c2bf8 Added: mysql_query() now supports a "parameters" (array) argument
It can be used to safely replace "?" placeholders inside the query
with the given array entries.
2015-11-01 21:00:06 +01:00
turley
dc2f993d09 wait for loggingfacility on server crash
made the sql module at least a bit more scriptfriendly: its now save to pass sql objects as parameters, result objects get automatically freed. Thus also removed the mysql_free_result function.
mysql_close is also now senseless, but kept for the guys who want to close the connection direct.
All I could do in half an hour sorry..
Never ever pass a C API directly into a scripting language!
And now the complete class: "Never ever ..."
2014-01-20 19:14:20 +00:00
KevinEady
3a87db9186 Fixed: adding missing mysql_close() entry to sql.em
Fixed:      OpenSellWindow() "Buyable" container wasn't actually restricting what entries showed
2013-06-17 23:38:29 +00:00
KevinEady
98ec1bc528 Fixed: bug in mysql_select_db() returning error on successful calls
Fixed:      adding missing mysql_free_result() entry to sql.em
2013-05-25 19:57:00 +00:00
KevinEady
25c1b0ccb8 11-22-2011 kevin:
Added:	pol/sqlscrobj.cpp pol/sqlscrobj.h
  Changed:	pol/module/sqlmod.cpp pol/module/sqlmod.h
  			Add preliminary MySQL database support.
  			New eScript objects: BSQLConnection, BSQLResultSet, BSQLRow 
  			Added several new sql module functions:
  				mysql_connect(host,username,password);
				mysql_query(connection,query);
				mysql_fetch_row(result);
				mysql_affected_rows(result);
				mysql_num_fields(result);
				mysql_num_rows(result);
				mysql_select_db(connection,database);
				mysql_field_name(result,column_index);
				mysql_free_result(result);
				mysql_close(connection);
			In order to build with MySQL support, define the HAVE_MYSQL preprocessor directive in your build configuration.
			You must have the MySQL headers and libraries installed. 
			Only really tested with dynamically linking mysql libraries on Linux.
			
	Added:	pol/network/auxclient.h
  Changed:	pol/network/auxclient.cpp pol/module/osmod.cpp pol/module/osmod.h clib/socketsvc.cpp clib/socketsvc.h
  			Moved AuxClient-related classes to its own header file (shared between auxclient.cpp and osmod.cpp)
  			Implemented os::OpenConnection() to create outgoing TCP/IP connections. 
  			
  Changed:	runecl/runecl.cpp
  			Added the sql module to runecl to allow quick testing

  Changed:	pol/uoscrobj.cpp pol/mobile/charactr.cpp pol/mobile/character.h bscript/parser.cpp bscript/objmembers.h
  			Added read/write property "mountedsteps" for mobiles. Represents number of steps taken while character was mounted.

  Changed:	bscript/parser.cpp
  			Declaring an array only using "{}" will show a compiler warning; please explicitly state 'array', 'struct', or 'dictionary' 
  Changed:	pol/pol.cpp
  			If using Linux, remove pol.pid on shutdown of pol.

  Changed:	pol/uoexec.h pol/scrsched.cpp
  			Added script option "AUXSVC_ASSUME_STRING" which will allow aux service connections to send and receive non-packed strings.

  Changed:	ecompile/ecompile.cpp
  			If using Linux, a slash ("/") cannot be used to define ecompile options to allow support for absolute filenames.

  Changed:	bscript/object.cpp bscript/bobject.h
  			Implemented array operation MultiSubscript. Will return a splice of an array, eg:
  				array{"a","b","c","d","e"}[2,4] will return array{"b","c","d"}
2011-11-23 05:49:30 +00:00
muaddib_pol
64c62dc404 + More module organization
+ Addition of base SQL EM module. Does nothing, just there as main point entry so far
2009-09-07 15:10:12 +00:00