Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    MYSQL




Coding A Forum To Read On A CD


I have a fairly large ubb that I would like made available on CD. Is it possible to do this?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Help With SQL Coding
I have three tables:

table1:
table2_ID
table3_ID
complete

table3:
table3_ID
name

table2:
table2_ID
table4_ID

Given table3.table3_ID, I need to retrieve the value of table1.complete OR
"Not Complete".

I have tried this in several different iterations without success.

SELECT
IF(ISNULL(e.complete), e.complete,'Not Complete') as complete
FROM table3 s
RIGHT OUTER JOIN table1 e ON e.table3_ID = s.table3_ID
INNER JOIN table2 t ON t.table2_ID = e.table2_ID
WHERE s.table3_ID = 2993
AND t.table4_ID = 10029.

SQL Coding
I need some help writing a sql script to run in phpMyAdmin. I have a table (one of many) called products. Inside, there is a field called product_id. That same record then has another field called product_ship_price.
I have a list of product_id's that I need to change the product_ship_price.
Can someone give me the SQL to do this? I know it's simple, I just don't know all of the SQL commands.

DataBase Coding
I have converted most of my applications over to C++ with Windows but have stayed with the DBF files.

I an currently producing some basic html pages and using Javascript functions which are very much like C. I now need to do some database work. i.e. allow my users to id themself and then present them with choices based on their ID. Can I do this on the server side with JavaScript?

ASP Coding Strangeness
I have been using MySQL for years but today I am stymied.
I wrote a simple ASP program to tell me how many records are in a particular table:

The select string =

SELECT COUNT(*) FROM Products

After I execute it using a recordset called 'rs, I display the contents of what is returned (rs(0)) and it properly shows me that there are 14 records in the table.

But if I run an even simpler select string on that table

SELECT * FROM Products

I get rs.eof (a return indicating no records found.)

What in the world could cause such behavior?

Coding In General
I just started a website, and am trying to run phpbb on it. I installed (I believe correctly) php and (again, I believe correctly) MySQL. I have enabled the MySQL extension in the php.ini, and added the extension_dir field for the lbrmysql.dll as well.
When I try to run the install.php now for the phpbb, I now get a CGI time out. If I undo the changes I made, then it tells me it can't access MySQL. I know that I have PHP issues as well, but most of my problems seem to stem from the fact I have no clue how to configure the relationship between SQL and PHP.
Please tell me where to start looking, and any information I need to post to help give an idea of what's going on.

Previous Version Coding
I am trying to load some sql into myphpadmin and whilst I believe I have a later version of 5.0 which is causing the error (as this coding is apparently up to version 5.0), can someone suggest how I go about finding the coding to use with my version?

Here are some of the errors:
CODESET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"

MySql Coding In Perl Manual
Can anyone point me to a good online (or downloadable) manual on MySql coding in Perl?

Set Up New Forum
I would like to set up a forum on an FTP server. I have downloaded a Forum template but I do not know how to use MySQL with it. How should I upload it and make it useable for people?

I do not have the luxury of spending very much money, this would be a Guild Thread for people that play an mmorpg with me.

Wp-Forum DB
I get this problem whenever I go to my forums page.
PHP Code:

 WordPress database error: [Unknown column 'sort' in 'order clause']

Forum
I am thinking of making a forum from scratch using PHP and MySQL, what would be thwe best way of doing this?

DB For A Forum.
i have worked with DB before but not with mysql and not on this level.i need to create a DB for a forum i have downloaded, but where to start?
i am using apache2triad.
i am aware i have to create a DB for the forum but i have no info on how. i create a DB and it wants to know about tables and so-on.
now what do? how many tables do i need and where will i get this info.

Forum Tree
I am trying to find an elegant solution for a forum tree, but I don't know enough about MySql.

Let me try and explain what I try:

1. Someone writes a story (A)

2. Someone gives a reaction (A1)

3. Someone else gives a reaction (A2)

4. Someone reacts to A1 (A1a)

5. Someone reacts to A1a (A1aI)

etc. etc.

I would like the order on the page to be the logical one, ie:
A
  A1
     A1a
          A1aI
  A2
  A3
     A3a
  A4
etc. etc.

What fields would I have to add to be able to fetch the entire forum in the logical order with only one query? Do I add a 'Parent' field plus an index? Or other fields? What would the query look like?

Maybe you think I should work it out by myself, and you would be right there, but I have been breaking my head over this for quite some time already.

Installing A Forum
Well im talking with my friend who is hosing my webserver.

Now when I try to install vbulletin and go and edit the config, the port is wrong. My friend says he dose not know how to figure out with port im on. So far i know its no 3306.

DB Back-up SSH || Forum
when i backed up dB using SSH db is for exmaple 50 MB

Code:

mysqldump -u zodehala -p123 db > backup/vb.sql

but if i use vBulletin its interface to back up db is for example 80 MB
What is the difference between them ?
what is technical explain ?

MySQL For My Forum
Hi folks sorry if i post this in the wrong forum i wasn't sure , Anyway im completely new to this so please bare with me, Im with a webhosting company called oneandone in the UK who host my website but they only offer me a maximum MySQL databse size of 100MB so i was wondering if i can and how i would be able to setup my own databse on my own computer Win XP Pro to host my forum myself but i still want my hosting company to host my website

Phpbb Forum
I'm experiencing some problems trying to get my phpbb forum to work with mysql. I'm running the newest version of apache, and php is installed and working, but I'm not quite sure about what I have to do with the MySQL database part to get it working. If anyone knows of any tutorials or anything I would be grateful
Just for reference: I'm a newb when it comes to both php, and MySQL.

Custom Forum
I'm creating my own forum... unfortunately, my sticky script is being quite unpleasant. The sticky is.. sticking to the bottom!Here's my SQL query:Code:

$fQuery = mysql_query("SELECT * FROM `forumtopics` WHERE `forum` = '$f' ORDER BY `sticky` ASC, `timeEdited` DESC LIMIT $limit1, $limit2")
or die(mysql_error());

What's wrong? `sticky` is a boolean column, and `timeEdited is just a number (generated with time()).

I Have Way Too Many Inserts/updates In My Forum
when someone posts a thread theres 2 count queries
2 fetch queries
3 insert queries
and 2 update queries

so my question is, is there a way to do a sort of join query for inserts and updates?

also, has anyone got some mysql musts?
i dont see a mysql tips thread
i think there should be one

One Database For Site And Forum?
I have a site and a forum and I want to use one database for them, so when somebody registers in the site - to be registered automatically in the forum.
Is this possible and if it is - how?

Merge Two Forum Databases?
I have two phpbb2 forums which I would like to integrate into one forum. I've installed a new forum in the location where I would like the merged forums to go. All I need now is a way to get both of the old databases into the new one I made. I've backed up both databases, but everytime I try to import them into the current one I get errors.

I know I barely know what I am doing, so how can I do this correctly? The tables are the same for both databases, so I just need the data in the tables.

Forum Refresh Issues
I pass a few variables through the URL in GET statements, and I have the problem when people press back it gives the screen asking to resend the information.  I also get the problem when I post a response and press back and it posts the response again.  Is there a simple way to stop this besides writing a script limiting the posts per certain amount of time??

Forum Search Not Working
Trying to find information about character sets, probably a fairly basic question ... but frustrated because the Search option in the forums doesn't work for me either on my Linux/Ubuntu box or on a W2000 PC.

I have cookies enabled for forums.mysql.com on both, but all I get is a blank screen.

Moving Forum That Uses Database
AOn my website that I am busy rebuilding, I have a forum that uses the MySQL database. The current path of the forum is this:

ingwaz.nl/main/ingwaz.nl/berichtenbord/mercuryboard/index.php

Which is obviously way too long, blame it to inexperience when it comes to designing websites :rolleyes: I want the path to become this:

ingwaz.nl/main/berichtenbord/index.php

The question is, can I move the forum from one folder to another without problems or is this going to mess up the linking with the tables in the database?

Forum Code Using MySQL/PHP
I am currently working on coding a forum for my website. I am fairly new to this coding stuff so i apologise if if this is something really easy.
The way i have coded the forum so far is that one page will display a list of all the topics within that forum. It also displays the unique ID of that topic. The topic headings are set up as a link which when clicked i want it to search the database for all the replies that link to that topic. I have linked the replies to the topics using simply the topic ID.
The problem i am having is i cant work out how to pass the ID variable along in my link, or how to code the link so it will find the replies for that particular topic.
Maybe i have gone about it all totally wrong and need to start from scratch.

Forum (IPS Driver Error)
Whenever i go to send a PM in my invision forum the following error comes up,

Quote: mySQL query error: SELECT m.mgroup_others, m.id, m.name, m.members_disable_pm, m.members_display_name, m.msg_total, m.view_pop, m.email_pm, m.language, m.email, me.vdirs, g.g_max_messages, g.g_use_pm FROM forummembers m, forumgroups g
LEFT JOIN forummember_extra me ON (m.id=me.id)
WHERE LOWER(m.members_display_name) IN ('jabski')
AND m.mgroup=g.g_id

SQL error: Unknown column 'm.id' in 'on clause'
SQL error code:
Date: Thursday 19th 2006f January 2006 08:53:58 PM

any idea what this is, i have reinstalled the forum twice and refreshed the database twice

Duplicate Forum Messages
What is the most efficient way to check if a forum user is posting a message they already posted? Would getting a select count of the number of duped messages be more efficient, or is there a better way?Example: bob posts 'kfafasfas', then tries to post 'kfafasfas' again as a new message, but it's a dupe of the first post.

Forum Related Table Structure
I didn't know whether to post this in the php forum or mysql--we'll try this one:

Suppose that I have a mysql-php based forum running. Users table (simplified) looks like:

Users
------------
user_id (int, primary_key)
username (varchar(30))
password (varchar(30))
read_post_ids (text)


Currently, 'read_post_ids' is a comma-separated list of all the post ids that a user has clicked on, which are marked as such.
Currently a php script is resposible for reading the list into an array, looping through to find values if needed, and on a write back to the db it takes the array and turns it back into a CSV string.

Problem: The table isn't even in 1NF because of this field, and extra processing is going on. As an alternative, I have considered dropping 'read_post_ids' from this table, and starting a new table:

Read_Post_Ids
-------------
id
read_post_id
user_id

This normals the tables and makes queries easier, but I worry about storage. Let's say I have 10,000 forum users, that on average read 20 posts per day. that is 200,000 table rows per day. In a year, I have 71,000,000 rows. If I index the fields (as I probably should for speed), the rows take up even more room. If I decide to only allow a user a maximum of 300 stored 'read posts' (for example), then I probably have to add a timestamp field so I can delete the older ids, which takes up even more space.

So is there a preferred method here? I would prefer that the tables be normaled, but I worry about the table growing out of hand in terms of size, and at some point becoming slow.

Corrupt Text After Moving Forum
hello i just moved my vbulletin forum to another server, but the forum is in spanish and after moving all the database the special spanish characters are corrupted in all the forum, for example instead of

Quote:

Tamaño máximo para subir archivos

Quote:

Tamaño máximo para subir archivos

the new server is 4.1.20 and the old one is 4.1.14, theres any way i could solve this?

Sample Schema For A Discussion Forum
I'm trying to design tables for a discussion forum on my website. I'm looking for a sample schema to start with.

Forum Database Merging Question
I am very new to databases although I have backed up, and imported several forum db's using BigDump. That's as far as my knowledge goes i'm afraid.

I have two similar smf forum dumps which I would like to merge into one database. If you imagine and old forum added to a new forum, or two different forums that decide to merge all their boards, posts and members into one.

I have spent some time now reading up on sql, searching for scripts and creating databases in an attempt to get this to work. As I have said, I am a real novice at this kind of thing and would really appreciate some help.

Basically a script would be a dream come true, but I have yet to find one. I am prepaired to read, learn and experiment if somebody could just point me in the right direction. Lastly, if this has been achieved before, a link to a guide or howto would be amazing.

Auto Close Forum Posts
Need help writing a query that checks the date a particular forum post was posted, compares it with the current date. If there is a difference of 30 days, the forum post should be closed.

The database table is called "Discussions"
The "DateCreated" Field of a particular post is Datetime type in the form 2007-04-12 09:21:46

Compare this date of every post with current date, if more than 30 days have passed, then add a 1 to the "Closed" field.

Can I Recover My Forum Database From Ibdata1
Deleted my account in cpanel and lost all the database.. I looked around on my server and found a file called ibdata1 172mb's

This was about the size of my db so im guessing it has somthing to do with it!

Anyone know much about these files and if i might be able to, restore my forum some way with it?

Combining A Chat & Forum Database
But how would I combine a chat and forum so that if one registered for one of them then they would register for both? Basically how would I make a database allowing someone access to any part of the site?

Php Mysql Comments/forum Layout
i ve made a script where php INSERT's data into a table. a table which has "poster" "comment". could anyone please tell me how to echo these results starting from the newest to the last result? use the same kind of layout as a forum if that helps.. o and has timestamps got any use in this?

Forum Outta Mysql Space
my forum (vbulletin) is currently not connected a database because my hosting says ive used 150 megs outta the 100 allowed and theres no way to increase the space.

i was wondering if it is normal to for forums to use that much space? i have about 7,500 users 80k posts. i dont know what to do, is it normal for a forum to use that much mysql space and would anyone know of a good realiable host for mysql hosting because i might have to change servers.

How Do I Change The Date Of A Post On My Forum Site?
Hi, I have started a forum site with a couple of friends. The forum runs on xoops using php 4 with a mysql (4) database. I accidently deleted a few posts. No problem there because I had a copy of the text and posted it again. But the problem is the date and time - obviously it shows the date of the new post and not the date of the deleted one. As I am a newbie still experimenting with mysql and php, I'd sure appreciate your help.

Summary:
=======
I need to change the date of a post in the mysql database. I access the database using phpmyadmin.

How Do I Extract All My Text Data Input From A Php Forum?
I manage a small website using phpbb on a Solaris platform, using mysql 4.x. After being repeatedly hacked, I'd like to migrate to a less singled out forum bb, but without losing my data--most of which is in Chinese characters (so doing string searches is definitely out).

I have direct file access via ftp to the server, and i've also downloaded the corrupted files, only two of which have been modified by the hacker, namely,

phpbb_config.ISD
phpbb_forums.ISD

Unfortunately, the last previous backup the hosting company performed was some 8 months before...

Moving A Forum (phpbb2) With Apache And MySQL
I was wondering if there was a tutorial for moving a complete server from one PC to another and have it exactly like it was, besides IP's exc exc. If you could give me a few steps to back up all my stuff in MySQL and PHPBB it would answer my question.

Two Sites Using The Same Forum Database User List
I know it's possible for TWO different sites to use the same database. Let me explain.

I have siteA and it runs a forum. Through the site, users of the forum can login using their forum ID. I now create siteB on a different domain, but on the same hosting service. I want users from siteA to be able to login with their name from that site on siteB. How would I do this? I'm using myBB as my forum software.

Read-only Tables
Is there a way to mark a table as read-only (after inserting some initial data, of course)?
I'd like to do it for optimization reasons - hoping that mysql could take advantage of the knowledge it's read-only, for caching, etc.

Read From MySQL
I installed appache server and php and work great..

But i cant read data from my sql .

I use this code to connect to connect to mySQL
server:localHost
username:root
password: ****

// Connect to the database server
$dbcnx = @mysql_connect('localhost', 'root', 'password');
if (!$dbcnx) {
die( '<p>Unable to connect to the ' .
'database server at this time.</p>' );
}
...
......
Should i create another account in mySQL? .or the php can not communicate with mySQL ?''

How Do I Read The Log-bin File?
Does anyone know how to read the binary log from a client workstation?  

The log is named hostname-bin.001 and when I open the file it is unreadable (obviously because it is in binary).  So making a shortcut to that file will not do the trick.  

How can I open the file via a mysql command prompt on a client PC?

How To Lock A Max ID From Being Read
Basically what I want to do is read the maximum id_B from some table with id_A = 5 and insert a new row with a new id_B. While I do this I don't want anyone else to be able to insert a new row with id_A = 5.

If I do this:

SET AUTOCOMMIT=0;
SELECT MAX(id_B) FROM table WHERE id_A = '5' LOCK IN SHARE MODE;
// do php code here to increment MAX(id_B) by 1 and save it to $new_id_B
INSERT INTO table (id_A, id_B) VALUES ('5', '$new_id_B')
COMMIT;

Would this prevent other users from inserting a new record with id_A = 5, while I'm adding a new record with id_A = 5.

Read Default Value
I have table with simple data. all of fields have default value

how to read this default value, using php

How To Read Log Files
I running on Win2K3 and need to know the basics of mySql system health logs (their location, their expected contents and format) and any other logs that might help track down problems when mySql crashes. I've seen that it will log EventViewer events and that within the C:Program FilesMySQLMySQL Server 5.0data directory there are some logs.

I've been able to read the .err log since it's text but the other logs are binary. Do I have to use a cmdline app within the mySql distriubtion to read the binary files? Or, is this a well documented format and there are several 3rd party utilities out there that will parse/display these logs.

In general, where does mySql maintain its log files, does it generate separate log files per database and what are some common applications that I need to get familiar with to view the contents of these files?

Table Is Read Only
I've upgraded a server from RHEL4 to RHEL5, and in the process gone from 4.1 to 5.0. I copied over all of the database files, adjusted permissions, and ran mysql_upgrade. It's a very simple application that needs no security, so it's running without passwords.

The application works fine reading, but will not write to the table:

[root@chekov etc]# ip_age_off_autoblock
iptables: Bad rule (does a matching rule exist in that chain?)
iptables: Bad rule (does a matching rule exist in that chain?)
DBD::mysql::st execute failed: Table 'addresses' is read only at /usr/local/scri
pts/ip_age_off_autoblock line 47.
Unable to execute at /usr/local/scripts/ip_age_off_autoblock line 47.

I've tried granting privleges to anonymous users:

mysql> grant select,insert,update,delete,create,drop,references,index,alter on *.* to '';

to no avail. Absolutely nothing shows up in the log file.

Read Out An AUTO_INCREMENT-ed Value
The first column of my table is AUTO_INCREMENT. I fill my table with 5 records with a blanco value in their first field. The first column of my table will then hold the values 1,2,3,4,5 (top>down).

Then I erase those 5. Then I add a new record with a blanco first value. It will get number 6.

My problem in this scenario:

I want to read out this number 6 before I will insert that record. Is that possible?

How To Read Phpbb
php file is loaded as codes on windows, but when u upload it on web u get the codes showed as image and stuff, so my question is, when using local host (windows xp) what prog or how i can see the php files not as codes/source when opening but as image or table or whatever.

Table Is Read Only
i transfer my mysql database in windows into linux by copy and paste it.when i want to update table record,it promt an error msg:

Error Code : 1036
Table 'ardi02' is read only
(2 ms taken).


Copyright © 2005-08 www.BigResource.com, All rights reserved