darkling235
Forum Replies Created
-
Forum: Plugins
In reply to: WordPress have a DB query apiOk I managed to use bbforums DB connection to do it. Thanks to everyone who helped me work this out
Forum: Plugins
In reply to: WordPress have a DB query apiI’m sorry I am new at this. I read in the DB api tutorial to import
include_once(‘../wp-config.php’);
include_once(‘../wp-includes/wp-db.php’);which I did thinking that was the correct way to get access to the wordpress DB functions. When that failed I tried using
include_once(‘config.php’);
include_once(‘../wp-includes/wp-db.php’);i.e. importing wordpress DB functions and the config for bbpress (which do have the same DB seettings) and that gave me no exceptions except that it still won’t update the DB.
Am I importing the wrong files? I got the file names from the http://codex.ww.wp.xz.cn/Function_Reference/wpdb_Class
Forum: Plugins
In reply to: WordPress have a DB query apiActually part of the problem, which I sadly forgot to mention, was I couldn’t import wp-config. I’m using bbpress and apparently there is a duplicate declaration of _http_build_query() in bbpress’s wp-functions.php. It is wrapped in an if statement claiming the function will only be created if it does not already exist but it doesn’t seem to be working. Any idea why?
Thanks a lotForum: Plugins
In reply to: WordPress have a DB query apiThe DB request isn;t working right. When I try to load the values for the DB manually in a constructor it works fine but if I don’t plug in those values it seems to get them wrong. WordPress software does create rows in the DB itself in other areas so I know it must have access to the DB login values but I’m not getting them. Can anyone tell me what I’m doing wrong?
function addZipcodeToDB($avatar, $user) { global $wpdb; //This was an experiment to see if that let us //connect correctly. It did. //$wpdb = new wpdb("root", "root", "wordpress", "localhost"); $wpdb->show_errors(); $query="UPDATE bb_users SET avatar =\"".$avatar."\" WHERE user_login= \"".$user."\""; $wpdb->query($query); }Forum: Plugins
In reply to: WordPress have a DB query apiOk thanks I’ll try those functions
Forum: Plugins
In reply to: WordPress have a DB query apiThanks for the help. I really appreciate it.
This may be a foolish question but can anyone show me how to extract the username, password and DB name out of the wpdb? My php skills aren’t quite up to snuff.Forum: Plugins
In reply to: Adding a required registration fieldOne more thing: can anyone tell me how to set what information is extracted from the DB and set in session or in a cookie?
Thanks again