FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Help with fud_add_user
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Help with fud_add_user [message #35002 is a reply to message #34975] Fri, 01 December 2006 14:30 Go to previous messageGo to previous message
appscontent   United States
Messages: 33
Registered: November 2006
Karma:
Member
Thanks for the help ... made some progress but get the following in the Error Log Browser:

(/home/eunivers/FUDforum/include/theme/default/db.inc:72
/home/eunivers/FUDforum/include/theme/default/db.inc:176
/home/eunivers/FUDforum/scripts/fudapi.inc.php:676
/home/eunivers/FUDforum/scripts/addusercvs.php:15
) 1054: Unknown column 'e' in 'field list'
Query: INSERT INTO fud26_users ( login, alias, passwd, name, email, icq, aim, yahoo, msnm, jabber, affero, posts_ppg, time_zone, bday, last_visit, conf_key, user_image, join_date, location, theme, occupation, interests, referer_id, last_read, sig, home_page, bio, users_opt, reg_ip ) VALUES ( 'e', 'e', 'e', 'e', 'e', 0, 'e', 'e', 'e', 'e', 'e', 0, 'e', 0, 0, 'e', 'e', e, 'e', 0, 'e', 'e', 0, 0, 'e', 'e', 'e', 0, -1 )
Server Version: 4.0.25-standard


Here's my script ...


<?php
include_once("/home/eunivers/FUDforum/include/GLOBALS.php");
include ("fudapi.inc.php");
$filename = "/home/eunivers/bin/testusers.txt";
$fh = fopen ($filename, "r") or die("Could not open file");
while (!feof($fh))
{
$fields = fgetcsv($fh, 20);
$err = 0;
$vals = array();
$vals['login'] = $fields[0];
$vals['passwd'] = $fields[1];
$vals['email'] = $fields[2];
$vals['name'] = $fields[3];
$usid = fud_add_user($vals, &$err);
fclose ($fh);
?>


Here's my CSV data file ...


user1,password1,email1(at)noplace(dot)com,name1
user2,password2,email2(at)noplace(dot)com,name2
user3,password3,email3(at)noplace(dot)com,name3
user4,password4,email4(at)noplace(dot)com,name4
user5,password5,email5(at)noplace(dot)com,name5

[Updated on: Fri, 01 December 2006 14:33]

Report message to a moderator

[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: fudForum within a trusted intranet
Next Topic: How to convert all FUDforum from ISO-8859-1 to UTF-8?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 01:31:47 GMT 2024

Total time taken to generate the page: 0.04444 seconds