0

I run a non-profit association bulletin board using vBulletin software. I have been unable to find a vBulletin coder to help me with a MYSQL query. Seems straight forward to me. I have a csv email file of paid up association members. I also have vBulletin members/users who might or might not be association members. I want to run a query every quarter to compare the csv list to the BB members and any matches would be added to an addition usergroup for special website privalages. The additional user group could be zeroed out each time before running the query (or be part of the query).

If this is not the correct place to post this, could you please direct me to an appropriate venue.

Thank you,

Grant Sarver

Edited by Grantsarver: n/a

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by griswolf
0

Sounds like you know pretty much how you will go about it. I suggest that you create a temporary table (DROP if exists tablename first) and then run your query against that and the vBullletin tables. The command I think you want is mysqlimport:

mysqlimport --help
mysqlimport Ver 3.7 Distrib 5.1.39, for apple-darwin9.5.0 (i386)
Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Loads tables from text files in various formats. The base name of the
text file must be the name of the table that should be used.
If one uses sockets to connect to the MySQL server, the server will open and
read the text file directly. In other cases the client will open the text
file. The SQL command 'LOAD DATA INFILE' is used to import the rows.

Usage: mysqlimport [OPTIONS] database textfile
(there is more).

You can also look online: http://dev.mysql.com/doc/refman/5.0/en/mysqlimport.html

0

No, I really don't know much, just some ancient stuff (ever here of DBase?). I have no idea how to go about this. And I sure can't risk my DB with tinkering. Possibly you could give me a clearer step-by-step and I could have a VB coder do it from there? Paid work is certainly a possibility. Or point me in the right direction. I just need someone who can do this. Thanks for your help griswolf!

0

I'm not a DBA. The steps for your or your person to take are:

  1. DROP TABLE IF EXISTS [I]sometemporarytable[/I]; /* just to be sure */
  2. Use mysqlimport from the command line OR write some code to read csv and insert into sometemporarytable
  3. Do your queries against existing and temporary tables, generating reports
  4. (Do some updates?)
  5. DROP TABLE [I]sometemporarytable[/I]; /* not strictly necessary */

If you want to do this by hand, then you can write a little cheat sheet to follow every time, loosely based on the list above. I think the effort and frequency is small enough to reasonably do it that way. The alternative is to write some script or executable that does the work every time: More initial effort, but it becomes a 'Push the big red button' effort after that, and can be done by anyone who needs the results without the need to be even semi-technical.

Yes, I have heard of DBase :)

Edited by griswolf: n/a

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.