Code: Select all
$itembought = "INSERT into inventory(id, name, stats, statadd, randid,type) VALUES ('$playerid','$name','$stats','$statadd','$randid2','$type')";
Code: Select all
$itembought = "INSERT into inventory(id, name, stats, statadd, randid,type) VALUES ('$playerid','$name','$stats','$statadd','$randid2','$type')";
Code: Select all
$itembought = "INSERT into inventory(id, name, stats, statadd, randid,type) VALUES ($playerid,'$name','$stats',$statadd,$randid2,'$type')";
So u're missing the mysql files for the store and inventory?dawi03 wrote:Either I have missed something but I cannot for the life of me find what part of video 6 or 7 I need to go to to find what to put in PHPmyadmin for the Store and the Item page?
As it just comes up " could not select player inventory"
Code: Select all
CREATE TABLE IF NOT EXISTS `store` (
`name` varchar(50) NOT NULL,
`stats` varchar(30) NOT NULL,
`statadd` smallint(3) NOT NULL,
`price` int(11) NOT NULL,
`amount` smallint(5) NOT NULL,
`randid` int(9) NOT NULL,
`type` varchar(30) NOT NULL,
`location` varchar(31) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Code: Select all
CREATE TABLE IF NOT EXISTS `items` (
`name` varchar(21) NOT NULL,
`stats` varchar(11) NOT NULL,
`statadd` smallint(3) NOT NULL,
`price` int(11) NOT NULL,
`type` varchar(21) NOT NULL,
KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Code: Select all
CREATE TABLE IF NOT EXISTS `inventory` (
`id` int(11) NOT NULL,
`name` varchar(50) NOT NULL,
`stats` varchar(30) NOT NULL,
`statadd` smallint(3) NOT NULL,
`price` int(11) NOT NULL,
`randid` int(9) NOT NULL,
`type` varchar(30) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Epiales wrote:Code: Select all
CREATE TABLE IF NOT EXISTS `store` ( `name` varchar(50) NOT NULL, `stats` varchar(30) NOT NULL, `statadd` smallint(3) NOT NULL, `price` int(11) NOT NULL, `amount` smallint(5) NOT NULL, `randid` int(9) NOT NULL, `type` varchar(30) NOT NULL, `location` varchar(31) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Code: Select all
CREATE TABLE IF NOT EXISTS `items` ( `name` varchar(21) NOT NULL, `stats` varchar(11) NOT NULL, `statadd` smallint(3) NOT NULL, `price` int(11) NOT NULL, `type` varchar(21) NOT NULL, KEY `name` (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Code: Select all
CREATE TABLE IF NOT EXISTS `inventory` ( `id` int(11) NOT NULL, `name` varchar(50) NOT NULL, `stats` varchar(30) NOT NULL, `statadd` smallint(3) NOT NULL, `price` int(11) NOT NULL, `randid` int(9) NOT NULL, `type` varchar(30) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;