mysql help
#1

Can anyone help with this?

PHP код:
error 021symbol already defined"mysql_connect"
error 025: function heading differs from prototype
error 025
: function heading differs from prototype
fatal error 107
too many error messages on one line 
Reply
#2

According to your errors, it seems that you defined 'mysql_connect' twice or more than two times, according to the other 025 errors, you got a wrong parameter with one of the public functions, the prototype must be exactly the same. Make sure that all your parameters are same, post the code of your public function and the defination of it and post the defination of it aka forward if capable.
Please show me your code and make sure to include PHP or CODE tags.
Reply
#3

PHP код:
stock initiateConnections() {
    new
        
FilefhConnectionInfo fopen("MySQL.txt"io_read);

    
fread(fhConnectionInfoszQueryOutput);
    
fclose(fhConnectionInfo);

    
sscanf(szQueryOutput"p<|>e<s[32]s[32]s[32]s[64]>"connectionInfo);
    
    
#if defined DEBUG
    
printf("[debug] initiateConnections() '%s', '%s', '%s', '%s'"szQueryOutputconnectionInfo[szDatabaseHostname], connectionInfo[szDatabaseUsername], connectionInfo[szDatabaseName], connectionInfo[szDatabasePassword]);
    
#endif
    
    
databaseConnection mysql_connect()(connectionInfo[szDatabaseHostname], connectionInfo[szDatabaseUsername], connectionInfo[szDatabaseName], connectionInfo[szDatabasePassword]);
    return 
true;

Reply
#4

Does anyone know how I can fix, this? I still can not figure it out.
Reply
#5

Код:
databaseConnection = mysql_connect()(connectionInfo[szDatabaseHostname], connectionInfo[szDatabaseUsername], connectionInfo[szDatabaseName], connectionInfo[szDatabasePassword]);
What are these parentheses doing there?
Reply
#6

Try removing the line, since it's saying that it's already defined.

Код:
    databaseConnection = mysql_connect()(connectionInfo[szDatabaseHostname], connectionInfo[szDatabaseUsername], connectionInfo[szDatabaseName], connectionInfo[szDatabasePassword]);
Reply
#7

hmm, I did and it still says shows up. But its weird because I dont have it defined at all now.
Reply
#8

I figured out why it that happened. I had two mysql.inc in my pawno folder but now when I try to compile it, i get an error on all any code with mysql any ideas?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)