MySQL. Issue with module design.
#4

Quote:
Originally Posted by mamorunl
Посмотреть сообщение
The problem is that PHP is way more dynamic. Pawn is supposed to be one file to edit small stuff.

I have had the same problems with my modulair design, so the big parts, I had in my main file. Things as mysql_connect. I am not competent enough to give you a real answer, but I can tell you that I would've probably done it the same way.
Thank you for ur input Mamorunl.

I think i just don't know something and it's possible.

There one more question: is code in includes executing after including?

It's strange:

main.pwn

Код:
#include <a_samp>
#include <a_mysql>

#include "../include/mysql.inc"

...some query with mysql handler...
mysql.inc

Код:
#include <a_samp>
#include <a_mysql>

#define HOST "localhost"
#define USER "root"
#define DB "test"
#define PWD "12345"

new mysql;

mysql = mysql_connect(HOST, USER, DB, PWD);
mysql_log(LOG_ALL); 
	
if (mysql_errno(mysql) != 0) print("MySQL is broken");
After trying to compile:

Код:
\../include/mysql.inc(11) : error 010: invalid function or declaration
\../include/mysql.inc(14) : error 010: invalid function or declaration
Reply


Messages In This Thread
MySQL. Issue with module design. - by ZZ - 15.06.2015, 17:25
Re: MySQL. Issue with module design. - by ZZ - 16.06.2015, 08:50
Re: MySQL. Issue with module design. - by mamorunl - 16.06.2015, 09:17
Re: MySQL. Issue with module design. - by ZZ - 16.06.2015, 09:45
Re: MySQL. Issue with module design. - by Vince - 16.06.2015, 09:58
Re: MySQL. Issue with module design. - by ZZ - 16.06.2015, 10:15
Re: MySQL. Issue with module design. - by Vince - 16.06.2015, 10:30

Forum Jump:


Users browsing this thread: 1 Guest(s)