You only need those ticks if you use reserved words and only for them. If you use the char table or row for example which is a reserved word because of the char datatype that is used in the sql syntax when creating a new table.@@tmav94
You have to enclose table names in backticks ex.: `char`
and if you want to find only one row you have to group them.
sidenote: nameid --> type int(11) unsigned so you can't format it as string
I recommend this query
SELECT *
FROM `inventory`, `cart_inventory`, `storage`, `guild_storage`
WHERE nameid = 2629 --This is Meg for example just replace it whatever you want
GROUP BY nameid
Greetings
SET @nameid = 2629;SELECT * FROM inventory, cart_inventory, `storage`, guild_storageWHERE inventory.nameid = @nameidOR cart_inventory.nameid = @nameidOR`storage`.nameid = @nameidOR guild_storage.nameid = @nameidGROUP BY inventory.nameid
This query return anything only if item present in all this tableswell I learned to use them
SELECT * FROM inventory, cart_inventory, `storage`, guild_storageWHERE inventory.nameid = cart_inventory.nameidAND cart_inventory.nameid = `storage`.nameidAND `storage`.nameid = guild_storage.nameidAND inventory.nameid = 2629GROUP BY inventory.nameid
Syntax is fine but I get no results
Yeah right.This query return anything only if item present in all this tableswell I learned to use them
SELECT * FROM inventory, cart_inventory, `storage`, guild_storageWHERE inventory.nameid = cart_inventory.nameidAND cart_inventory.nameid = `storage`.nameidAND `storage`.nameid = guild_storage.nameidAND inventory.nameid = 2629GROUP BY inventory.nameid
Syntax is fine but I get no results
Thought the thing was to combine them based on if the user has the same stuff in his storage stuff.@@Winterfox
Yeah right.This query return anything only if item present in all this tableswell I learned to use them
SELECT * FROM inventory, cart_inventory, `storage`, guild_storageWHERE inventory.nameid = cart_inventory.nameidAND cart_inventory.nameid = `storage`.nameidAND `storage`.nameid = guild_storage.nameidAND inventory.nameid = 2629GROUP BY inventory.nameid
Syntax is fine but I get no results
SET @nameid = 2629;SELECT * FROM inventory, cart_inventory, `storage`, guild_storageWHERE inventory.nameid = @nameidOR cart_inventory.nameid = @nameidOR`storage`.nameid = @nameidOR guild_storage.nameid = @nameidGROUP BY inventory.nameid
We use essential cookies to make this site work, and optional cookies to enhance your experience.