AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Help/MySQL] Load Query failed. [1054] Unknown column (https://forums.alliedmods.net/showthread.php?t=282438)

KaLoIaN 05-07-2016 02:19

[Help/MySQL] Load Query failed. [1054] Unknown column
 
Here is the error:
L 05/07/2016 - 09:13:13: [zp_mod_advs_mysqltest.amxx] Load Query failed. [1054] Unknown column 'escapes.name' in 'where clause'

Here is the code:
http://pastebin.com/huN4m6mY

Code is in pastebin because the cloudflare of alliedmods does not allow me to post the thread.

P.S.
Load_MySQL is in client_putinserver

GordonFreeman (RU) 05-07-2016 04:53

Re: [Help/MySQL] Load Query failed. [1054] Unknown column
 
just remove `escapes`.

KaLoIaN 05-07-2016 08:35

Re: [Help/MySQL] Load Query failed. [1054] Unknown column
 
Quote:

Originally Posted by GordonFreeman (RU) (Post 2417328)
just remove `escapes`.

LOL

L 05/07/2016 - 15:33:37: [zp_mod_advs_mysqltest.amxx] Load Query failed. [1054] Unknown column 'name' in 'where clause'


I use this tutorial:
https://forums.alliedmods.net/showthread.php?t=132686

Bugsy 05-07-2016 10:58

Re: [Help/MySQL] Load Query failed. [1054] Unknown column
 
I would rename the 'name' field to something else. I believe name is a reserved term in SQL, try player_name instead.

KaLoIaN 05-08-2016 02:48

Re: [Help/MySQL] Load Query failed. [1054] Unknown column
 
Quote:

Originally Posted by Bugsy (Post 2417400)
I would rename the 'name' field to something else. I believe name is a reserved term in SQL, try player_name instead.

L 05/08/2016 - 09:45:32: [zp_mod_advs_mysqltest.amxx] Load Query failed. [1054] Unknown column 'escapes.pname' in 'where clause'


Hmmmm... nope.....

KaLoIaN 05-08-2016 08:21

Re: [Help/MySQL] Load Query failed. [1054] Unknown column
 
Quote:

Originally Posted by Bugsy (Post 2417400)
I would rename the 'name' field to something else. I believe name is a reserved term in SQL, try player_name instead.

That error occurs when someone connects to the server.

KaLoIaN 05-08-2016 14:18

Re: [Help/MySQL] Load Query failed. [1054] Unknown column
 
Another error just appeared: L 05/08/2016 - 21:16:19: [zp_mod_advs_mysqltest.amxx] Load Query failed. [1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's')' at line 1

That SQL is super problematic ......

Bugsy 05-08-2016 15:23

Re: [Help/MySQL] Load Query failed. [1054] Unknown column
 
Try adding this at the top of your SQL init function.

SQL_SetAffinity( "sqlite" );

And go into modules.ini and set it this way
Code:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; SQL Modules usually need to be enabled manually ;;
;; You can have any number on at a time.  Use      ;;
;;  amx_sql_type in sql.cfg to specify the default ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;mysql
sqlite


KaLoIaN 05-09-2016 03:12

Re: [Help/MySQL] Load Query failed. [1054] Unknown column
 
Quote:

Originally Posted by Bugsy (Post 2417686)
Try adding this at the top of your SQL init function.

SQL_SetAffinity( "sqlite" );

And go into modules.ini and set it this way
Code:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; SQL Modules usually need to be enabled manually ;;
;; You can have any number on at a time.  Use      ;;
;;  amx_sql_type in sql.cfg to specify the default ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;mysql
sqlite


Done.. now another error:

L 05/09/2016 - 10:10:23: [zp_mod_advs_mysqltest.amxx] Load Query failed. [1] no such column: escapes.pname


Mine SQL Init looks like:

PHP Code:

public MySql_Init()
{
    
SQL_SetAffinity"sqlite" ); 


KaLoIaN 05-11-2016 04:33

Re: [Help/MySQL] Load Query failed. [1054] Unknown column
 
Somebody...?


All times are GMT -4. The time now is 18:32.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.