Jump to content

iyeru42

Members
  • Content Count

    231
  • Joined

  • Last visited

Community Reputation

0 Neutral

About iyeru42

  • Rank
    Member
  • Birthday 09/19/1987

Contact Methods

  • AIM
    iyeru42
  • MSN
    iyeru42@gmail.com
  • Website URL
    http://iyeru42.info
  • ICQ
    194968784
  • Yahoo
    iansempai

Profile Information

  • Location
    Wisconsin
  • Interests
    Anime, RPGs

Previous Fields

  • Languages
    PHP4, HTML, CSS
  1. iyeru42

    Outdated coppermine bridge... mybb

    The bridge is now fixed... mybb had to change its cookie path to get sessons right.
  2. iyeru42

    Outdated coppermine bridge... mybb

    Delete Post
  3. iyeru42

    Outdated coppermine bridge... mybb

    I need help with correcting the following MyBB 1.4.1 partial Bridge... <?php/************************* Coppermine Photo Gallery ************************ Copyright © 2003-2008 Dev Team v1.1 originally written by Gregory DEMAR This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation. ******************************************** Coppermine version: 1.4.19 $HeadURL: [url="https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.4.x/bridge/mybb.inc.php"]https://coppermine.svn.sourceforge.net/svnr...ge/mybb.inc.php[/url] $ $Revision: 4392 $ $Author: gaugau $ $Date: 2008-04-16 09:25:35 +0200 (Mi, 16 Apr 2008) $**********************************************/if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');// Switch that allows overriding the bridge manager with hard-coded valuesdefine('USE_BRIDGEMGR', 1);require_once 'bridge/udb_base.inc.php';class cpg_udb extends core_udb { function cpg_udb() { global $BRIDGE; if (!USE_BRIDGEMGR) { // the vars that are used when bridgemgr is disabled // URL of your punbb $this->boardurl = 'http://localhost/mybb'; // local path to your punbb config file require_once('../mybb/inc/config.php'); $this->use_post_based_groups = 1; } else { // the vars from the bridgemgr $this->boardurl = $BRIDGE['full_forum_url']; require_once($BRIDGE['relative_path_to_config_file'] . 'config.php'); $this->use_post_based_groups = $BRIDGE['use_post_based_groups']; } $this->multigroups = 0; $this->group_overrride = 0; // Database connection settings $this->db = array( 'name' => $config['database']['database'], 'host' => $config['database']['hostname'], 'user' => $config['database']['username'], 'password' => $config['database']['password'], 'prefix' =>$config['database']['table_prefix'] ); // Board table names $this->table = array( 'users' => 'users', 'groups' => 'usergroups', 'sessions' => 'sessions', ); // Derived full table names $this->usertable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['users']; $this->groupstable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['groups']; $this->sessionstable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['sessions']; // Table field names $this->field = array( 'username' => 'username', // name of 'username' field in users table 'user_id' => 'uid', // name of 'id' field in users table 'password' => 'loginkey', // name of 'password' field in users table 'email' => 'email', // name of 'email' field in users table 'regdate' => 'regdate', // name of 'registered' field in users table 'location' => "''", // name of 'location' field in users table 'website' => 'website', // name of 'website' field in users table 'usertbl_group_id' => 'usergroup', // name of 'group id' field in users table 'grouptbl_group_id' => 'gid', // name of 'group id' field in groups table 'grouptbl_group_name' => 'title' // name of 'group name' field in groups table ); // Pages to redirect to $this->page = array( 'register' => '/member.php?action=register', 'editusers' => '/memberlist.php', 'edituserprofile' => "/member.php?action=profile&uid=" ); // Group ids $this->admingroups = array(4); $this->guestgroup = $this->use_post_based_groups ? 101 : 3; // Connect to db $this->connect(); } // definition of how to extract id, name, group from a session cookie function session_extraction() { if (!isset($_COOKIE['sid'])) return false; $this->sid = addslashes($_COOKIE['sid']); if (!$this->sid) return false; $this->ipaddress = $this->getip(); $result = cpg_db_query("SELECT u.{$this->field['user_id']}, u.{$this->field['password']} FROM {$this->sessionstable} AS s INNER JOIN {$this->usertable} AS u ON u.uid = s.uid WHERE sid='".$this->sid."' AND ip='".$this->ipaddress."'", $this->link_id); if (!mysql_num_rows($result)) return false; $row = mysql_fetch_row($result); return $row; } // definition of how to extract an id and password hash from a cookie function cookie_extraction() { return isset($_COOKIE['mybbuser']) ? array_map('addslashes', explode("_", $_COOKIE['mybbuser'], 2)) : false; } // imported function function getip() { if($_SERVER['HTTP_X_FORWARDED_FOR']) { if(preg_match_all("#[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}#s", $_SERVER['HTTP_X_FORWARDED_FOR'], $addresses)) { while(list($key, $val) = each($addresses[0])) { if(!preg_match("#^(10|172\.16|192\.168)\.#", $val)) { $ip = $val; break; } } } } if(!$ip) { if($_SERVER['HTTP_CLIENT_IP']) { $ip = $_SERVER['HTTP_CLIENT_IP']; } else { $ip = $_SERVER['REMOTE_ADDR']; } } return $ip; } // definition of actions required to convert a password from user database form to cookie form function udb_hash_db($password) { return $password; } // Login function login_page() { $this->redirect('/member.php?action=login'); } // Logout function logout_page() { $this->redirect('/member.php?action=logout&uid=' . USER_ID . '&sid=' . $this->sid); } function view_users() { if (!$this->use_post_based_groups) $this->redirect($this->page['editusers']); } function get_users($options = array()) { } function view_profile($uid) { }}// and go !$cpg_udb = new cpg_udb;?> to work with the new MyBB 1.4.1 Config.php... <?php/** * Database configuration * * Please see the MyBB Wiki for advanced * database configuration for larger installations * [url="http://wiki.mybboard.net/"]http://wiki.mybboard.net/[/url] */$config['database']['type'] = 'mysqli';$config['database']['database'] = '';$config['database']['table_prefix'] = 'mybb_';$config['database']['hostname'] = 'localhost';$config['database']['username'] = '';$config['database']['password'] = '';/** * Admin CP directory * For security reasons, it is recommended you * rename your Admin CP directory. You then need * to adjust the value below to point to the * new directory. */$config['admin_dir'] = 'admin';/** * Hide all Admin CP links * If you wish to hide all Admin CP links * on the front end of the board after * renaming your Admin CP directory, set this * to 1. */$config['hide_admin_links'] = 0;/** * Data-cache configuration * The data cache is a temporary cache * of the most commonly accessed data in MyBB. * By default, the database is used to store this data. * * If you wish to use the file system (cache/ directory), MemCache or eAccelerator * you can change the value below to 'files', 'memcache' or 'eaccelerator' from 'db'. */$config['cache_store'] = 'db';/** * Memcache configuration * If you are using memcache as your data-cache, * you need to configure the hostname and port * of your memcache server below. * * If not using memcache, ignore this section. */$config['memcache_host'] = 'localhost';$config['memcache_port'] = 11211;/** * Super Administrators * A comma separated list of user IDs who cannot * be edited, deleted or banned in the Admin CP. * The administrator permissions for these users * cannot be altered either. */$config['super_admins'] = '1';/** * Database Encoding * If you wish to set an encoding for MyBB uncomment * the line below (if it isn't already) and change * the current value to the mysql charset: * [url="http://dev.mysql.com/doc/refman/5.1/en/charset-mysql.html"]http://dev.mysql.com/doc/refman/5.1/en/charset-mysql.html[/url] */$config['database']['encoding'] = 'utf8';/** * Automatic Log Pruning * The MyBB task system can automatically prune * various log files created by MyBB. * To enable this functionality for the logs below, set the * the number of days before each log should be pruned. * If you set the value to 0, the logs will not be pruned. */$config['log_pruning'] = array( 'admin_logs' => 365, // Administrator logs 'mod_logs' => 365, // Moderator logs 'task_logs' => 30, // Scheduled task logs 'mail_logs' => 180, // Mail error logs 'user_mail_logs' => 180, // User mail logs 'promotion_logs' => 180 // Promotion logs); ?> Also note, that a simple edit of the database config (in array $this->db) won't be the only thing that needs fixing. I cannot be logged in with my forum information for some reason. (You can also see the bad things that ensued from it.)Table structure of the mybb 1.4 if needed: CREATE TABLE IF NOT EXISTS `mybb_usergroups` ( `gid` smallint(5) unsigned NOT NULL auto_increment, `type` smallint(2) NOT NULL default '2', `title` varchar(120) NOT NULL default '', `description` text NOT NULL, `namestyle` varchar(200) NOT NULL default '{username}', `usertitle` varchar(120) NOT NULL default '', `stars` smallint(4) NOT NULL default '0', `starimage` varchar(120) NOT NULL default '', `image` varchar(120) NOT NULL default '', `disporder` smallint(6) unsigned NOT NULL, `isbannedgroup` int(1) NOT NULL default '0', `canview` int(1) NOT NULL default '0', `canviewthreads` int(1) NOT NULL default '0', `canviewprofiles` int(1) NOT NULL default '0', `candlattachments` int(1) NOT NULL default '0', `canpostthreads` int(1) NOT NULL default '0', `canpostreplys` int(1) NOT NULL default '0', `canpostattachments` int(1) NOT NULL default '0', `canratethreads` int(1) NOT NULL default '0', `caneditposts` int(1) NOT NULL default '0', `candeleteposts` int(1) NOT NULL default '0', `candeletethreads` int(1) NOT NULL default '0', `caneditattachments` int(1) NOT NULL default '0', `canpostpolls` int(1) NOT NULL default '0', `canvotepolls` int(1) NOT NULL default '0', `canusepms` int(1) NOT NULL default '0', `cansendpms` int(1) NOT NULL default '0', `cantrackpms` int(1) NOT NULL default '0', `candenypmreceipts` int(1) NOT NULL default '0', `pmquota` int(3) NOT NULL default '0', `maxpmrecipients` int(4) NOT NULL default '5', `cansendemail` int(1) NOT NULL default '0', `maxemails` int(3) NOT NULL default '5', `canviewmemberlist` int(1) NOT NULL default '0', `canviewcalendar` int(1) NOT NULL default '0', `canaddevents` int(1) NOT NULL default '0', `canbypasseventmod` int(1) NOT NULL default '0', `canmoderateevents` int(1) NOT NULL default '0', `canviewonline` int(1) NOT NULL default '0', `canviewwolinvis` int(1) NOT NULL default '0', `canviewonlineips` int(1) NOT NULL default '0', `cancp` int(1) NOT NULL default '0', `issupermod` int(1) NOT NULL default '0', `cansearch` int(1) NOT NULL default '0', `canusercp` int(1) NOT NULL default '0', `canuploadavatars` int(1) NOT NULL default '0', `canratemembers` int(1) NOT NULL default '0', `canchangename` int(1) NOT NULL default '0', `showforumteam` int(1) NOT NULL default '0', `usereputationsystem` int(1) NOT NULL default '0', `cangivereputations` int(1) NOT NULL default '0', `reputationpower` bigint(30) NOT NULL default '0', `maxreputationsday` bigint(30) NOT NULL default '0', `candisplaygroup` int(1) NOT NULL default '0', `attachquota` bigint(30) NOT NULL default '0', `cancustomtitle` int(1) NOT NULL default '0', `canwarnusers` int(1) NOT NULL default '0', `canreceivewarnings` int(1) NOT NULL default '0', `maxwarningsday` int(3) NOT NULL default '3', `canmodcp` int(1) NOT NULL default '0', PRIMARY KEY (`gid`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=8;CREATE TABLE IF NOT EXISTS `mybb_users` ( `uid` int(10) unsigned NOT NULL auto_increment, `username` varchar(120) NOT NULL default '', `password` varchar(120) NOT NULL default '', `salt` varchar(10) NOT NULL default '', `loginkey` varchar(50) NOT NULL default '', `email` varchar(220) NOT NULL default '', `postnum` int(10) NOT NULL default '0', `avatar` varchar(200) NOT NULL default '', `avatardimensions` varchar(10) NOT NULL default '', `avatartype` varchar(10) NOT NULL default '0', `usergroup` smallint(5) unsigned NOT NULL default '0', `additionalgroups` varchar(200) NOT NULL default '', `displaygroup` smallint(5) unsigned NOT NULL default '0', `usertitle` varchar(250) NOT NULL default '', `regdate` bigint(30) NOT NULL default '0', `lastactive` bigint(30) NOT NULL default '0', `lastvisit` bigint(30) NOT NULL default '0', `lastpost` bigint(30) NOT NULL default '0', `website` varchar(200) NOT NULL default '', `icq` varchar(10) NOT NULL default '', `aim` varchar(50) NOT NULL default '', `yahoo` varchar(50) NOT NULL default '', `msn` varchar(75) NOT NULL default '', `birthday` varchar(15) NOT NULL default '', `birthdayprivacy` varchar(4) NOT NULL default 'all', `signature` text NOT NULL, `allownotices` int(1) NOT NULL default '0', `hideemail` int(1) NOT NULL default '0', `subscriptionmethod` int(1) NOT NULL default '0', `invisible` int(1) NOT NULL default '0', `receivepms` int(1) NOT NULL default '0', `pmnotice` int(1) NOT NULL default '0', `pmnotify` int(1) NOT NULL default '0', `remember` int(1) NOT NULL default '0', `threadmode` varchar(8) NOT NULL default '', `showsigs` int(1) NOT NULL default '0', `showavatars` int(1) NOT NULL default '0', `showquickreply` int(1) NOT NULL default '0', `showredirect` int(1) NOT NULL default '0', `ppp` smallint(6) NOT NULL default '0', `tpp` smallint(6) NOT NULL default '0', `daysprune` smallint(6) NOT NULL default '0', `dateformat` varchar(4) NOT NULL default '', `timeformat` varchar(4) NOT NULL default '', `timezone` varchar(4) NOT NULL default '', `dst` int(1) NOT NULL default '0', `dstcorrection` int(1) NOT NULL default '0', `buddylist` text NOT NULL, `ignorelist` text NOT NULL, `style` smallint(5) unsigned NOT NULL default '0', `away` int(1) NOT NULL default '0', `awaydate` int(10) unsigned NOT NULL default '0', `returndate` varchar(15) NOT NULL default '', `awayreason` varchar(200) NOT NULL default '', `pmfolders` text NOT NULL, `notepad` text NOT NULL, `referrer` int(10) unsigned NOT NULL default '0', `reputation` bigint(30) NOT NULL default '0', `regip` varchar(50) NOT NULL default '', `lastip` varchar(50) NOT NULL default '', `longregip` int(10) NOT NULL default '0', `longlastip` int(10) NOT NULL default '0', `language` varchar(50) NOT NULL default '', `timeonline` bigint(30) NOT NULL default '0', `showcodebuttons` int(1) NOT NULL default '1', `totalpms` int(10) NOT NULL default '0', `unreadpms` int(10) NOT NULL default '0', `warningpoints` int(3) NOT NULL default '0', `moderateposts` int(1) NOT NULL default '0', `moderationtime` bigint(30) NOT NULL default '0', `suspendposting` int(1) NOT NULL default '0', `suspensiontime` bigint(30) NOT NULL default '0', `coppauser` int(1) NOT NULL default '0', `classicpostbit` int(1) NOT NULL default '0', PRIMARY KEY (`uid`), UNIQUE KEY `username` (`username`), KEY `usergroup` (`usergroup`), KEY `birthday` (`birthday`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2;CREATE TABLE IF NOT EXISTS `mybb_sessions` ( `sid` varchar(32) NOT NULL default '', `uid` int(10) unsigned NOT NULL default '0', `ip` varchar(40) NOT NULL default '', `time` bigint(30) NOT NULL default '0', `location` varchar(150) NOT NULL default '', `useragent` varchar(100) NOT NULL default '', `anonymous` int(1) NOT NULL default '0', `nopermission` int(1) NOT NULL default '0', `location1` int(10) NOT NULL default '0', `location2` int(10) NOT NULL default '0', `loginattempts` tinyint(2) NOT NULL default '1', `failedlogin` bigint(30) NOT NULL default '0', PRIMARY KEY (`sid`), KEY `location1` (`location1`), KEY `location2` (`location2`), KEY `time` (`time`), KEY `uid` (`uid`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  4. iyeru42

    Using regex to parse text as links...

    Thanks, but now I have a new problem. Seems autoparse is being gotten, null. Which it isn't, it's 1.Also, your regex makes my whole posts go blank. // Convert links to clickable links.function clickableLinks($post){ // Regex Match $regex = "((?:http|ftp|https)://(?:\w+\.)+\w+\.?(?:/[\w.])*/?)(?!\]|\)|[\.;] )"; // Replace foo' $post = preg_replace($regex, '<a href="$1">$1</a>', $post); return $post;} Using this instead: $text = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_\+.~#?&//=]+)', '<a href="\\1">\\1</a>', $text); $text = eregi_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&//=]+)', '\\1<a href="http://\\2">\\2</a>', $text); $text = eregi_replace('([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3})', '<a href="mailto:\\1">\\1</a>', $text); and editing appropriately makes it work.
  5. iyeru42

    Using regex to parse text as links...

    So, how do I put this into php? do I use ereg_replace? No, I would use preg_replace if I used this.Example: <?php$string = 'April 15, 2003';$pattern = '/(\w+) (\d+), (\d+)/i';$replacement = '${1}1,$3';echo preg_replace($pattern, $replacement, $string);?> But I don't know how to incorporate your match.
  6. iyeru42

    Using regex to parse text as links...

    I still would rather have JUST the regex, I don't need a whole extra extension. I already have bbcode functions, and they work fine. Now I need to auto-parse links that people have not used bbcode with.I need it to check a variable, $iAutoParse and see if it's true (since I already have this variable defined, then search the post itself, $strPostBody, for any http:// and auto-parse them with <a href="$link[]">$link[]</a> or something.
  7. iyeru42

    Using regex to parse text as links...

    I don't manage my php installation, so I can't. I'm also no good at "compiling" either, just like on Linux.
  8. iyeru42

    Using regex to parse text as links...

    I need it so that it checks if the URL is within BBCode and if it is, won't parse it. Also, it should end the link if there's a ) or . or ; or ] and don't parse if there's a URL= attached to the front of http:// (IE: URL=http://)Basically, I want http://www.this.com to parse like IPB, etc. does automatically. Of course, not all URLs will have www. in front.
  9. iyeru42

    Getting SESSION Data, exec SQL, apply to SESSION

    It seems I fixed my error somehow.
  10. I'm having a problem with this, well... sort of. $usergroup_sql = mysql_query("SELECT * FROM `usergroups` WHERE `id`='".$_SESSION['usergroup']."'"); $userg_sql_array = mysql_fetch_assoc($usergroup_sql); $_SESSION['permissions']['cmakethreads'] = $userg_sql_array['cmakethreads']; In a blank PHP Document (manually defining $_SESSION['usergroup']), this works fine, but when I put it into my message board... Everything in $usergroup_sql is blank when its line executes. Note $_SESSION['usergroup'] DOES exist and is set to a number (meaning a session IS set) when I'm browsing around. (I echo'd it to make sure.)No, no MySQL Errors nor PHP Errors within the apache/mysql logs. I need to take that session variable though. There is no other way to read the current userid that I am logged in as.Anyway, you guys can download it from this folder (they're 7z files) and see what you make of it. Note, the setup and skin folders should be ignored. Most of those things have already been fixed.loadConfigs.php in the includes folder is where this all is being setup (check init.inc.php too, since it requires loadConfigs in a function.)You can also set up the board as well (but you need to delete dbinfo.inc.php), there shouldn't be any issues during setup. (Make sure that after you do the install.php you don't go back to it, it won't allow you to use it again as long as dbinfo.inc.php exists.)
  11. Another issue, but it focuses on two variables, one dependant off of a previous one. // Load Style Configs... // Get the default style first! $sql2 = mysql_query("SELECT `name`,`id` FROM `styles` WHERE `default`='1'"); $row2 = mysql_fetch_array($sql2); // Grab The style configs for that style. $sql3 = mysql_query("SELECT `content`,`name` FROM `style_config` WHERE `styleid`='{$row2['id']}'"); $style_cfg = Array(); while($row3 = mysql_fetch_array($sql3)){ $style_cfg[$row3['name']] = $row3['content']; } $CFG['style']['table']['bgcolor'] = $style_cfg['tbl-bg']; $CFG['style']['table']['cella'] = $style_cfg['tbl-cella']; $CFG['style']['table']['cellb'] = $style_cfg['tbl-cellb']; These three output blank. Not sure how to modify the loop above to make it work with this. Because, editing it like below... // Grab The style configs for that style. $sql3 = mysql_query("SELECT `content`,`name` FROM `style_config` WHERE `styleid`='{$row2['id']}'"); while($row3 = mysql_fetch_array($sql3)){ if($row3['name'] == "tbl-bg") $CFG['style']['table']['bgcolor'] = $row3['content']; else if($row3['name'] == "tbl-cella") $CFG['style']['table']['cella'] = $row3['content']; else if($row3['name'] == "tbl-cellb") $CFG['style']['table']['cellb'] = $row3['content']; } still outputs the three as blank. Although I don't really need it right now, since I'm going the roundabout way... // Grab The style configs for that style. $sql3 = mysql_query("SELECT `content`,`name` FROM `style_config` WHERE `name`='tbl-bg' OR `name`='tbl-cella' OR `name`='tbl-cellb' OR `name`='page-bg' OR `name`='forum-bg'"); while($row3 = mysql_fetch_array($sql3)){ if($row3['name'] == "tbl-bg") // Table BG $CFG['style']['table']['bgcolor'] = $row3['content']; else if($row3['name'] == "tbl-cella") // Cell A $CFG['style']['table']['cella'] = $row3['content']; else if($row3['name'] == "tbl-cellb") // Cell B $CFG['style']['table']['cellb'] = $row3['content']; else if($row3['name'] == "page-bg") // Page BG $CFG['style']['page']['bgcolor'] = $row3['content']; else if($row3['name'] == "forum-bg") // Forum BG $CFG['style']['forum']['bgcolor'] = $row3['content']; } but it would still be nice to know how to optimize the loop.
  12. iyeru42

    Getting STRING Data from MySQL Query

    I finally got it fixed by using this: <?phpif( ( $result = mysql_query( "SELECT name,data FROM maxlen" ) ) ){ while( $row = mysql_fetch_assoc( $result ) ) { $CFG['maxlen'][$row['name']]=$row['data']; } mysql_free_result( $result );}?>
  13. iyeru42

    Getting STRING Data from MySQL Query

    using these instead... $CFG['maxlen']['username'] = mysql_fetch_object(mysql_query("SELECT `data` FROM `maxlen` WHERE `name`='username'"), "data"); $CFG['maxlen']['password'] = mysql_fetch_object(mysql_query("SELECT `data` FROM `maxlen` WHERE `name`='password'"), "data"); $CFG['maxlen']['email'] = mysql_fetch_object(mysql_query("SELECT `data` FROM `maxlen` WHERE `name`='email'"), "data"); $CFG = Array(); $CFG['maxlen'] = mysql_fetch_array(mysql_query("SELECT `data` FROM `maxlen`"), MYSQL_ASSOC); Give out errors: Fatal error: Class 'data' not found in installDB.php on line 201 Notice: Undefined index: username in installDB.php on line 235Notice: Undefined index: username in installDB.php on line 237 second uses $CFG['maxlen']['username']respectively.
  14. iyeru42

    Getting STRING Data from MySQL Query

    I'm having a problem getting STRING data from a MySQL query.using the following: $CFG['maxlen']['username'] = mysql_fetch_object(mysql_query("SELECT `data` FROM `maxlen` WHERE `name`='username'")); $CFG['maxlen']['password'] = mysql_fetch_object(mysql_query("SELECT `data` FROM `maxlen` WHERE `name`='password'")); $CFG['maxlen']['email'] = mysql_fetch_object(mysql_query("SELECT `data` FROM `maxlen` WHERE `name`='email'")); gives me an error later stating that a class cannot be converted to a string.I used this instead: $CFG = Array(); $CFG['maxlen'] = mysql_fetch_array(mysql_query("SELECT `data` FROM `maxlen`")); But $CFG['maxlen']['username'] (a valid row in the select statement above) is not a valid index.I don't NEED to get an array, how do I just parse the data correctly so it doesn't output some useless data like "Resource id #4"?mysql_fetch_object, mysql_fetch_array, mysql_fetch_assoc won't work, they all get arrays and/or rows (and I know specifically WHAT row I want. So I don't NEED to get a row.) Using the plain mysql_query results in resource id #4 even though it should be resulting in 32 (username row value) $CFG['maxlen']['username'] = mysql_query("SELECT `data` FROM `maxlen` WHERE `name`='username'");
  15. iyeru42

    Column Count doesn't match value count

    Man, am I so stupid... I forgot a comma
×