phpMyAdmin seems the easiest way to populate my new vBulletin forum with hundreds of new users and articles. How do I do it? - mysql

My new vBulletin forum is empty, and I want to encourage new users to visit, like and contribute. But first, I need to make it...not empty. As an admin, I could manually type in a bunch of threads, all from 'admin' - but that won't work. One look at either an empty website or a site filled with admin posts are equally undesirable. So I need to add hundreds of posts from hundreds of users before day one.
I assume that I should do this via the database, which I can access from phpMyAdmin via cPanel. I tried to download (export) the 'user' table with its 74 columns as a CSV table for MS Excel, but when I opened it in Excel, it was not in table form - it was all , and " in a string. If I could only see it laid out nicely in Excel, I could paste hundreds of usernames into the USER table, and and hundreds of articles into the THREAD table. I think. Am I missing something?
I am definitely going to fake it until I make it - there is simply no other way with a new website. The question is whether I have to manually do it from the front end for each user and each new thread (weeks of work), or whether I can paste them all into the database in a couple of hours.
Please help. Thanks.

Just regarding Excel, use the 'Text to Columns' tool on the Data tab to convert the CSV string into columns.
Where are you getting the content from to pre-load your forum though? If you have to make it up anyway, then is there much actual time saving in loading data in via phpMyAdmin in reality?
Assuming you have some content available from somewhere though, then you can export to CSV again from Excel and use a CSV to SQL tool (eg. https://codebeautify.org/csv-to-sql-converter though there are others around also) to generate SQL INSERT statements for uploading via phpMyAdmin or other DB tools. (I don't recall if phpMyAdmin has a SQL file upload mechanism or if you just have to paste the SQL into the browser window... have not used it for a good few years now).

Related

Empty Object Explorer When Opening a H2 embedded database(.mv.db file) in DbVisualizer

EDIT: Please ignore the Database Type "MySQL". I have it set to H2 currently, I was just playing around with settings at the time of the screengrabs in an attempt to see if I could pinpoint what was going wrong.
My friend came to me tonight with an "Opportunity". He had a college student code a front end application to insert, update, delete, and view data on a local drive for a small company that he runs. The application broke when he updated windows, and now he needs to retrieve the data. He sent me the .mv.db file, so I did some digging and found that DbVisualizer could allow me to atleast use a simple MySQL query to pull his data out into an excel spreadsheet. According to him, there are only about 300 records in the database.
When I connect to the embedded H2 database, it opens up two empty databases.
Let me know if anybody knows what to do here. Thanks.
I ran into the same problem. Luckily my database was small as well so I could use SQuirreL SQL Client to open the database. It is not easy to get used to the user interface but it does a really good job.
If you want to export your data you probably want to change the settings (File -> Global Preferences, Tab SQL Script). I unticked the box 'Qualify .. with schema' to get valid SQL.
Also the date format is not standard conform. I used a text editor to get executable SQL.

What is the best way to routinely import a CSV or XML file into a MS access database?

I have an Access database that keeps track of many different aspects of my companies performance and I would like to add functionality to keep track of the hours the employees are working.
The hours are all kept track of on a website called timetracker. They have a few reporting options including XML and CSV files. The site has a favorite report feature to get the same data in the format that I want it every week.
What I would like to do is find the best process for getting the data from this website, into a table in my database that I can reference.
I will not be the one executing whatever process I come up with and I would really like it to be as easy as possible for whoever it is that does have to do it.
Right now I have a linked table that is an XML file in our SharePoint folder. I was thinking that maybe we could just run the report and download the file every week then just save it over the old file with the correct sheet names and it should update.
What I am wondering is if anyone can come up with an easier process for doing this that would take the least amount of time and be easiest to write down instructions for that anyone could execute.
(Would it maybe be possible to create some sort of macro to actually download the report automatically?)

How to protect Access database and limit to certain computers

Good morning,
I'm doing a project, the customer prefers to use Access 2013 as the all in one package - front end, database etc.
In short the customer will give their users a blank copy of the database, which is taken on site and used to generate data based on calibration of equipment for that site.
The problem is the customer doesn't want anyone being able to copy the access database and use it themselves. So basically when on site he doesn't want the customer or anyone to go "oh that database is hand, give me a copy and I'll use it for myself".
I know I can compile the database but that will only protect the source.
Any suggestions on the best way to limit the use of the database?
It's been a few years and I may be foggy on parts of this, but I know you can get around password protected databases, and can bypass the 'startup' form/code so that you can open the database and view all the objects. You are correct that an MDE will not show the code. But if you have a table of valid serial numbers or MAC Id's, then I would have a module that encrypts the data in that table. Otherwise someone could add their values and still run the program? We also did some devious things like create an install package that would create some hidden file in some existing folder (with a calculated value as content), then if Access didn't find that file & content it would not run.

Access - Linked Excel Sheet query

I am currently working on a database which will bring a number of excel sheets together. I have created a link between the ones in which I need and set up relationships in Access.
I have first-year degree experience of Microsoft software packages. I am not going to move from Excel to Access as other team members are more comfortable using it. However running things like reports, creating forms and querying data can be easier in Access.
The Problem:
I am trying to query data from a linked spreadsheet and it sometimes works and sometimes doesn't. Often more than none my queries return blank when I know they shouldn't.
Is this something to do with the table being linked and not an access table?
Please see an example query that I have set up
Thank you in advance.
If I assume that Status On is a Date field then your criteria is treating this as text, and this expression:
Like "*/*/2013"
may cause unexpected return results, depending particularly on the default Date format of Excel. Use the criteria:
Year([Status On])=2013
which will be much more reliable, not depending on the formatting of the date, purely on the fact that it is a recognisable date.
I don't usually have issues linking to Excel files unless:
The file is Open
The Excel files has links to other files or macros
It is corrupted in some way.
If you are linking to an Excel file then it, ideally, should be a very simple file with, preferably, no other content than a single table of data.

Want to restore data to contact form 7, wordpress

My site got hacked and in the end I had to remove the entire WordPress installation and database. My biggest problem now is that I used the Contact Form 7 with a very large number of contacts and it is no longer in my database since I had to make a new one. I did manage to make a backup of the tables containing the contact form data (as SQL and XML). But I don't know if it's possible to restore the data from the backed up tables to the new ones? I don't want to drop the new tables and replace them with the backed up ones (and alter the names of the tables), because I'm not sure if the constraints get the correct name and so on. The database is MySQL via phpMyAdmin
So, essentially I want to move data from one table to a new! Is it possible?
EDIT: Så I imported the old contact form tables, with new names, and it didn't work. BUT, when I reverted to an older version of contact form, it worked. Seems there is a difference in how the versions handle and stores the data. But now I can't upgrade it! As soon as I do, all my contacts disappear. Does anyone know how to fix it, or why it behaves this way?
Contact Form 7 holds all its data in wp_contact_form_7 table (assuming your table prefix is wp_) and doesn't assign forms to pages with a typical database key relationship. Rather, it will place a marker in your page content that gets interpreted and replaced by the plugin and renders the proper form based on the name it finds in your post.
Assuming all your pages & posts have been imported back into your new DB the way it was before, and you've already got CF7 enabled as a plugin, you should be able to import the old contact_form_7 table into your new database from phpMyAdmin without issue.
As always, make a backup of your new database as well in case something goes wrong.