Please help..I found an old script which offer members so they can add buddylist, but I get this error when I want to add buddy:

MySQL Query Error: UPDATE members SET buddylist='demo,' WHERE id='1' LIMIT 1; 
Returned Error: Unknown column 'buddylist' in 'field list' 

I locate back the buddylist.php and I have this line:

if($newbuds != ""){
$newbuds = $User->userdata['buddylist'].$newbuds;
$Db->query("UPDATE members SET buddylist='{$newbuds}' WHERE id='{$User->id}' LIMIT 1;");


Thanks in advance..

Edited by happygeek: fixed formatting

13 Years
Discussion Span
Last Post by UnknownZ

Make sure 'buddylist' in the table. If there is still error, then please provide your table structure.


Thanks, I forgot to add it, and it works now.
I have another error, could you advise me what should I do?

Fatal error: Cannot redeclare getmicrotime() (previously declared in /home/mysite/public_html/start.php:10) in /home/mysite/public_html/start.php on line 9
	// Some Stuff for Parse Time management:
	function getmicrotime(){
		list($usec, $sec) = explode(" ",microtime());
		return ((float)$usec + (float)$sec);
	define ("START_TIME", getmicrotime());
	function parsetime(){
		define ("END_TIME", getmicrotime());

Apperently you have declare/use the getmicrotime() function in the "start.php" file which include in the current file. The same function is declare in line 9 in start.php.


the getmicrotime() function is only in the http://www.mysite.com/start.php ..

It was okay, when I click on http://www.mysite.com/admin/index.php
but when I want to access http://www.mysite.com/admin/sources/display.php
that is where I get the error:

Fatal error: Cannot redeclare getmicrotime() (previously declared in /home/mysite/public_html/start.php:10) in /home/mysite/public_html/start.php on line 9

Here is the code in display.php

	/* Check user didn't load this file */
	if($Display->logged() != TRUE || !is_object($Display)) die("Fatal Error in script execution");
	/* Define Sub-Actions */
	$SubActions['templates'] = "Edit Templates";	
	$SubActions['config'] = "Display Config";

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.