Query not working

Started by Cool, Mar 07, 2017, 06:18 AM

Previous topic - Next topic

Cool

else if ( cmd == "spawnwepdel")
    {

    if ( CheckTableSpawnwep( player ) )
    {
        mysql_query( sDB, "DELETE FROM SpawnWep WHERE lower(Nick)='" + player.Name.tolower() + "'" );
print(mysql_error(sDB));
        ClientMessage( "-> Your Spawnwep have been deleted.",player,255,0,102); SpawnwepPlayer[ player.ID ] = null;
    }
    else ClientMessage( "-> Error: You not have spawnwep.",player,255,0,102);
    }
error: Table 'database.SpawnWep' Does not exists

Thijn

And what do you think that error means?

KAKAN

Steps to correct:
1. Open your MySQL database using phpMyAdmin
2. Check whether the table is 'Spawnwep' or 'Spawnweps'
oh no

Cool

Quote from: KAKAN on Mar 07, 2017, 08:14 AMSteps to correct:
1. Open your MySQL database using phpMyAdmin
2. Check whether the table is 'Spawnwep' or 'Spawnweps'
Spawnwep

Cool

Quote from: Thijn on Mar 07, 2017, 07:46 AMAnd what do you think that error means?
The error mean is table not exists but table is exists :)

Xmair

Quote from: happymint2 on Mar 07, 2017, 08:18 AM
Quote from: KAKAN on Mar 07, 2017, 08:14 AMSteps to correct:
1. Open your MySQL database using phpMyAdmin
2. Check whether the table is 'Spawnwep' or 'Spawnweps'
Spawnwep
Then try changing SpawnWep to Spawnwep. (If you're running the server in windows)

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

Cool

:P I did not notice this small mistake Thanks for pointing out