Shakeynath Posted February 26, 2010 Share Posted February 26, 2010 QUERY ERROR: Table 'solarbat_solarbat.votes' doesn't exist Query was SELECT * FROM votes WHERE userid=2 AND list='2' This is coming up on my voting code :/ Can anyone explain or even better help me sort this out please ?? Quote Link to comment Share on other sites More sharing options...
CrazyT Posted February 26, 2010 Share Posted February 26, 2010 The "votes" table doesn't exist in the database. Is what that error means. Quote Link to comment Share on other sites More sharing options...
Shakeynath Posted February 26, 2010 Author Share Posted February 26, 2010 A vote sql didnt come with the mod ive got :S Quote Link to comment Share on other sites More sharing options...
Nicholas Posted February 26, 2010 Share Posted February 26, 2010 post up your voting.php file, maybe we can extract the sql for the database out of it? Quote Link to comment Share on other sites More sharing options...
Shakeynath Posted February 26, 2010 Author Share Posted February 26, 2010 Its the advanced mod its paid for so should i post it ?? Quote Link to comment Share on other sites More sharing options...
Joshua Posted February 26, 2010 Share Posted February 26, 2010 No, you should contact the person you bought it from and get the votes table. Quote Link to comment Share on other sites More sharing options...
Nicholas Posted February 26, 2010 Share Posted February 26, 2010 oh since its a paid mod. contact the person you brought it off. Quote Link to comment Share on other sites More sharing options...
Shakeynath Posted February 27, 2010 Author Share Posted February 27, 2010 I cant get in touch with the lad i had it off :O What do i do now ??? Cant i send it to one of you guys ?? Quote Link to comment Share on other sites More sharing options...
wrx Posted February 27, 2010 Share Posted February 27, 2010 who did you by it from ? what mod is it? Quote Link to comment Share on other sites More sharing options...
Nicholas Posted February 27, 2010 Share Posted February 27, 2010 i think i know whats going on? Query was SELECT * FROM votes WHERE userid=2 AND list='2' shouldnt the query be sending the information in like this Query was SELECT * FROM votes WHERE userid=2 AND list='awg' (awg is Apex Web Gaming) to put it in the database like this... userid | list 2 | awg with the votes database like this CREATE TABLE IF NOT EXISTS `votes` ( `userid` int(11) NOT NULL default '0', `list` varchar(255) collate latin1_general_ci NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; this is my voting file... <?php session_start(); if(get_magic_quotes_gpc() == 0) { foreach($_POST as $k => $v) { $_POST[$k]=addslashes($v); } foreach($_GET as $k => $v) { $_GET[$k]=addslashes($v); } } require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; include "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $is=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid"); $ir=$db->fetch_row($is); $q=$db->query("SELECT * FROM votes WHERE userid=$userid AND list='awg'"); if($db->num_rows($q)) { print "You have already voted at Apex Web Gaming today!"; } else { $db->query("INSERT INTO votes values ($userid,'awg')"); $db->query("UPDATE users SET crystals=crystals+10, money=money+250 WHERE userid=$userid"); header("Location:http://apexwebgaming.com/in/4352"); exit; } ?> this is the voting file where the players get the information from for voting? as you can see there is 2 awg's, i think the first awg is line $q=$db->query("SELECT * FROM votes WHERE userid=$userid AND list='awg'"); and maybe yours is set up like... $q=$db->query("SELECT * FROM votes WHERE userid=$userid AND list='2"); and maybe line $db->query("INSERT INTO votes values ($userid,'awg')"); has the letters or number where the awg is and its typed in differently, both the awg's have to typed in the same on both lines? if you know what i mean lol hopefully ive not said it in a confusing way... Quote Link to comment Share on other sites More sharing options...
Shakeynath Posted February 28, 2010 Author Share Posted February 28, 2010 Fixed ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.