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






SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Creating A User Generated Content Website


I'm planning to create a community site (in PHP and MySQL) where people can post some sort of helpful information. I want to include features that would allow people to rate this information and post comments about it. I would also like to make this information searchable, so I want to include tags. To help you understand it better, the website is sort of like digg.com or engadget.com or any other website that have content and comments on it. Sort of like a blog site.

I already finished creating the login system. Now I need to work on the content posting system. I already thought about the SQL table to
store this content. Here's what I have so far:

ContentID, User, Title, ContentText, DatePosted, NumOfComments, Rating, Tags

For the comments, I would assume the SQL table would look like this:

ContentID, User, CommentNumber, CommentText

Now, am I on the right track here? This is my first time creating something like this. I'm also new to PHP and MySQL. Are there free scripts out there that does the same thing?.




View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Creating A Website Forum: Use Existing Website MySQL Db Or Create A Second Db?
I am getting ready to start coding my own forum.... to seemlessly integrate it into my existing website.

My question is this; should I:

a) create the new forum tables in my existing database (used for the website user accounts etc.), OR

b) create the new forum tables in a separate new database (it would be on the same server with same u/n p/w)

Which one is the better option? I've been banging my head over trying to decide which way to go...

View Replies !   View Related
Generated Sequence # Based Upon Content Of Row Being Inserted
I have a table -

CREATE TABLE `sample` (
`Id` smallint(6) NOT NULL auto_increment,
`division` varchar(5) NOT NULL,
`secion` varchar(5) NOT NULL,
`div_sect_seq` smallint(6) NOT NULL default '1',
PRIMARY KEY (`Id`)
);

I'd like to write the insert statement that would generate the next div_sect_seq number based upon the value being inserted into the table.

Let's say that the table contains:

|--id--|-division-|-section-|-div_sect_seq-|
| 1 | SC | XX | 000001 |
| 2 | SC | YY | 000001 |
| 3 | SC | XX | 000002 |

I'd like to insert a row for divsion = 'SC' and section = 'XX' with the next div_sect_seq (which would be the max value of div_sec_seq + 1 on the sample table for the division and section) which should be the value of 000003.

View Replies !   View Related
Date Mismatch – Migrating Website Content Database
`date` varchar(100) NOT NULL default '',

While Wordpress stores 2 dates:

`post_date` datetime NOT NULL default '0000-00-00 00:00:00',
`post_date_gmt` datetime NOT NULL default '0000-00-00 00:00:00',

View Replies !   View Related
Creating Website Search
I am attempting to create a search engine for my website. I have found a php script that should help me accomplish what I am trying to do, but I cannot get any search results to appear which means I have one or several or all of my parameters incorrect.

Right now, I have the search included on a separate page, and while I have connected the script to the database so that it no longer says 'Could not connect to database' or 'Access denied,' I cannot get any search results to display. Code:

View Replies !   View Related
User Interactive Website
I want to make an interactive website where people have to register to interact. (like fill out a form giving loging information and stuff). I want to do this using PHP/MySQL. Would anyone please show me how to do this, or give me a link to a website/tutorial that will?

View Replies !   View Related
Root User And Developing PHP/MySql WebSite
my webhosting company defaulted a root user with no password. I created a user for myself with a password, but wondering if having the root user without a password will leave the database open to intrusion. What's it there for, anyways?
On another note, what is a good IDE for developing a PHP/MySQL website that will be served from a UNIX server, but developed on a windows PC?

View Replies !   View Related
How To Show The Content Of A User Defined Procedure(function)
I wonder how to show to the content of a procedure/function which I defined before.

View Replies !   View Related
Creating New User
I am fairly new to MySQL. I have tried working with it in the past but not as much as lately. I would like to make a web page where a person fills in their desired user name and password to create a new user in MySQL giving them full access to their own database. How could I do this with HTML?

View Replies !   View Related
Creating A New User
I am trying to create a new user with limited permissions. I want them to be able to select, insert, update and delete from the pgvDialogue DB but have no access to other DBs or be able delete/create tables. Here is what I am doing but the user can still delete tables..

grant select, insert, update, delete on pgvDialogue.*
To 'newUser'@'%'

View Replies !   View Related
Creating User Error
I just upgraded to Mandriva 2005 and I'm having issues creating users in mysql. I'm doing the user creation using webmin. I keep getting the following error

"Lost connection to MySQL server during query"

Any ideas? I've never had this problem until now.

View Replies !   View Related
Creating New User Account
I have followed the manual for MySQL 5.0 for adding new accounts to MySQL but it will not work for me. I am typing these commands on the root on the actual computer with MySQL.

Every time I input these following commands, the command just returns this:

mysql> Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON *.* TO 'myusername'@'localhost'
-> IDENTIFIED BY 'mypass' WITH GRANT OPTION;

mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
-> ON mydatabase.*
-> TO 'myusername'@'localhost'
-> IDENTIFIED BY 'mypassword';

I've also tried this one
mysql> CREATE USER 'myusername'@'localhost' IDENTIFIED BY 'mypassword';

But it returns

mysql> ERROR (HY000): Opteration CREATE USER failed for 'myusername'@'localhost' .

View Replies !   View Related
Error Creating User
trying to create the user using the command line option gives the following error message:

ERROR 1227 (42000): Access denied; you need the CREATE USER privilege for this operation.

View Replies !   View Related
Creating A User From Code
Does anyone know if it's possible and how to create a user account from code on MySQL 4.1.5?

View Replies !   View Related
Creating A User Login
I am designing a website, which is almost complete, but would like to allow users to create an account, and login and out.

Is there an easy way to set this up? I have experience using MySQL but only through forum software such as phpbb and portals like phpnuke. These obviously set this up for you.

View Replies !   View Related
Creating Read Only User
When looking over the instructions for phpMyAdmin they want a read-only user. What GRANT permissions do I need to assign so a user has just read-only rights?

View Replies !   View Related
Error Creating A New User
I'm trying to create a new user (the only user that already exist in my installation is root at the moment). I'm using the following command line:

mysql> create user proy identified by 'proy2005';

But an error message appears saying:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to yuor MySQL server version for the right syntax to use near 'user proy identified by 'proy2005'' at line 1

I'm using MySQL version 4.1.7

View Replies !   View Related
Creating User Fails, But Why?
I have been told that below syntax is alright with mysql5, but I still get a syntax error:

GRANT SELECT (username, password, ppid) INSERT (username, password, ppid, sample, digifolder, graphics) UPDATE (username, password, ppid) ON test.cart TO 'owner@localhost' IDENTIFIED BY 'a55ghyhY';

Gives me:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT (username, password, ppid, sample, digifolder, graphics) ' at line 1

View Replies !   View Related
4.0.14 Standard Creating User Issues
We just installed mysql 4.0.14 on an xserve. When trying to add users via
mascon I'm finding an issue I have not seen in previously releases. When
adding a user it seems that the new column ssl_cipher is a required field.

I know this is new for v4 but is it supposed to be a required field? What
should the default be? I can't modify any user without being notified that
it is required.

View Replies !   View Related
Creating A User-defined Table
I am wanting to create a user defined table in mySQL. The general idea is that they all would have an asset number (PK). After that, the items can be different.

For instance, I may be keeping track of a table, in paticular it's color, size, and cost. OR I might keep track of a computer system, the OS it has installed, who owns it, etc.

View Replies !   View Related
Creating User Login With Database
I'm fairly new to using databases and I am wondering how you go about creating a user login with your database. I need to create a login system for a website. Would you use a CREATE USER statement every time you want to add a user, or is that a way for having developers access the database only? I also thought of creating a user table that would contain the users name and password, but how secure would that be?

View Replies !   View Related
Creating A User With A Hashed Password...
CREATE USER 'delete'@'localhost' IDENTIFIED BY PASSWORD PASSWORD('delete');

CREATE USER 'delete'@'localhost' IDENTIFIED BY PASSWORD 'PASSWORD('delete')';

View Replies !   View Related
Creating A User For Only One Database For The Web/ FORGET IT
If I wanted to create a user for only my website to only have access to one database and they will be connecting via php, what is the best way?

I should manually insert into the users table, correct?
INSERT INTO user VALUES('localhost','monty',PASSWORD('some_pass'),
'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
This is the example from mysql docs, but the whole page is huge and seems complicated.

Will this mean that only a user coming from the local host will get in this way? And where would I specify the database?

I'd like to have just php connecting to the database asside from root and that user only accessing one database to do inserts/updates/deletes and selects.

View Replies !   View Related
Relating User Table With Content Table
I have a mysql table with the curriculum vitae (CV) information of about 50 researchers. I would like each researcher to be able to edit and update his/her information. In order to do this I need to create a membership system for the researchers to access their respective CV page.

Before I do anything I want to plan this out, hopefully with a little help of more experienced developers and programmers. So I am open to any ideas.

This is the thing that stumps me the most right now:

Right now I have a CV table (with all the curriuculum vitae information) and need to create a users table that will somehow link with the CV table. Eventually, what I would like is with a login and password (that they choose) they will automatically open their CV page. These are the questions I have:

What fields in the user table should I use to link the user table with the CV table?
Once that is established, how, by providing their login and password can I direct them to their own page to update? Should one of the fields in one of the tables contain the (already existing) address of their CV page?

View Replies !   View Related
Creating A New User Generates A 1036 Error
I recently installed XAMPP which provided phpMyAdmin - 2.11.4 and MySQL client version: 5.0.5 and is running on Windows Vista.

I am logged in as 'root@localhost' and have tried to create a new user for a new database (wordpress).

However I only get the following:
#1036 - Table 'user' is read only.

Can anyone please suggest how I can do this?? Have googled extensively and nothing seems to be leaping out - at least for this version of MySQL..

View Replies !   View Related
Syntax Error When Creating A User Account
I want to add new account to mysql v. 4.0.21
Here is the sintax:

mysql> GRANT USAGE ON *.* TO acid@localhost IDENTIFIED BY "acid1";

When i try this I get an error 1064: You have an error in your sql sintax...

View Replies !   View Related
Errors Creating User: Count Mismatch
I've installed MySQL and it's working fine. I'm trying to create a user with the following command line (copied from a book that apparently works for MySQL 4.1):

insert into user values ('localhost', 'username', PASSWORD('password'),
'Y','Y','Y','Y','Y','Y','Y',
'N','N','N','N','N','N','N','N','N','N','N',
'N','N','N','N','N','N','N','N','N','N');

I get the following error:
ERROR 1136 (21S01): Column count doesn't match value count at row 1

I then used the /g command for 'user' and tried using 37 values to match the count and at that point I get the following error:

ERROR 1265 (01000): Data truncated for column 'ssl_type' at row 1

View Replies !   View Related
Creating A Form That Allows A User To Choose What Column
I am trying to create a form that allows a user to choose what column to search through the data. The Database has many columns and the user wants to select - say - all clients that dr. fred diagnosed.

The column is ExamDoctor and they shouldn't have to learn sql to do this. (they're lawyers btw.) But they might need to see who was diagnosed on 2000-02-11, with the column name DateDiagnosed.

View Replies !   View Related
Generated Index
We have a small database running on Win XP. We use Eclipse for development of our java app that uses this db.

When I insert a new record into a table with one existing entry, the key that MySQL generates for it is a huge number and causes errors in subsequent processing. The table is created by this:

CREATE TABLE scope
(
scope_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
activitygroup_id INT NOT NULL UNIQUE,
FOREIGN KEY (activitygroup_id) REFERENCES activitygroup(activitygroup_id) ON UPDATE CASCADE ON DELETE CASCADE
);

We have several other similar tables, but this is the only one that causes me this problem. We tried using MySQL Query Browser to change the 'index kind' from INDEX to UNIQUE and that solved the problem for my co-worker. It didn't do anything for me, though, so I suspect it's a red herring.

Can anyone suggest what I might try? I'm a completely new user. I started to look at the MySQL documentation and my eyes glazed over, so I'm quite ignorant of how this all works.

View Replies !   View Related
Internal Generated Foreign Key ID
When creating a table, I specify the name of the foreign key, but
MySQL generates it's own internal ID, along the lines of '0_16574'. To
generate fixes in our software we sometimes have to drop the foreign
keys, but the name we specified can not be referenced. I don't want to
have to manually type SHOW TABLE CREATE 'table_name', then drop each
foreign key by typing it in because a client doesn't want to worry
about the technical process, they just want to run the updates. Does
anyone know if there is a fix coming so that the name I specify as the
foreign key name is held, and can be referenced later, or is there a
way to find out what all the internally generated foreign key names
are referencing a specific table.

View Replies !   View Related
Auto Generated ID Number
I have to use MYSQL to set up a database. I have to give the user an ID number that should be 6 digits long and MUST be system generated. I have searched through the manual and it just mentioned the function mysql_insert_id() that it may be used in other case not mine. The (auto_increment) value doesnt work as well.

View Replies !   View Related
How To Obtain Automatically Generated Id
I want to write a php script that creates a new row in a table with an auto increment field and then creates additional records in other tables where the automatically generated field has to be used.

Is there a way to get the automatically generated number as a result of an Insert query so that I can then use it in the next queries?

View Replies !   View Related
Relay Logs Being Generated
I was looking through the mysql data directory and have noticed that relay logs are being generated on a regulay basis.These log names are in the format hostname-relay-bin.nnnnnn.
I was under the impression that relay logs were only generated if replicaition was set up/being used, and whilst I plan to set up replication in the near future,it is not being used at present.

View Replies !   View Related
SQL Syntax Error Near Generated By
I am getting the SQL syntax error near 'generated by ...
The statement that I was trying to execute:
create table JBPM_ACTION (ID_ bigint generated by default as identity (start with 1), class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ bit, REFERENCEDACTION_ bigint, ACTIONDELEGATION_ bigint, EVENT_ bigint, PROCESSDEFINITION_ bigint, EXPRESSION_ varchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ bigint, EVENTINDEX_ integer, EXCEPTIONHANDLER_ bigint, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));

View Replies !   View Related
Duplicate EntryNo Even It Is Auto-generated.
duplicate entryNo even it is auto-generated. how did this happened?

I created a simple application and more than 2 users can use it at the same time. The field entryNo is programmed to autoincrement every time a user adds a new record. how did it happened that 2 records have the same entryNo. for example

table Client

entryNo entryDate ClientName
1 1/30/07 John
2 2/2/07 Mark
3 2/3/07 Bon
3 2/3/07 Richard

is it possible that 2 users added a new record at the same time

3 2/3/07 Bon
3 2/3/07 Richard

what could be the cause and how to prevent it.

View Replies !   View Related
Conversion Of Oracle Generated Date
I've got three Oracle generated file fulls of 'Insert' statements. I'm using them to load my MySQL database and all is going well until I need to load a DATE column. Oracles default DATE format is MM/DD/YYYY, while it appears that MySQL DATE format is YYYY/DD/MM. So, how do I convert the Oracle format into MySQL format?

View Replies !   View Related
Organising Newly Generated Tables.
I'm currently improving my admin panel for my web site and I'm trying to decide how to add site instances. So I can basically create a new sub site as my main site with all the same features (so all the same DB tables).

What I'm trying to decide on is whether or not to lump all of those new tables into my existing database and add a prefix to the table name, or create a completely new database and add them into the new database.

My next little problem is that I then need 2 DB connections to get information for the new instance and then connect to the instance DB having grabbed the connection data. Or should possibly have a load of config files for each instance and keep paths to those files in an XML file and parse that and then include the necessary config with the path collected from my XML file.

Suggestions on which of my three contrived solutions might be the most efficient? baring in mind these database could get very very large as images are being stored in them, does the number of tables in a single DB affect performance.

View Replies !   View Related
Random MYI MYD Files Generated Consuming Disk
named as follows:

#sql_5d7e_0.MYI
#sql_5d7e_9.MYI
#sql_5d7e_6.MYI
#sql_5d7e_2.MYI
#sql_5d7e_5.MYI
#sql_5d7e_5.MYI
etc., etc.

In my error log I saw the following:

Incorrect key file for table '#sql_2684_1.MYI'; try to repair it (many of these for each "table")

View Replies !   View Related
Error 1064 From Workbench Generated Script
I have generated CREATE queries from ER diagrame on MySQL Workbench. But the generated query gives me

Error No:1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB' at line 10

The whole create query is below and unfortunatly I don't see any syntax errors if I didn't go code-blind:

View Replies !   View Related
How To Initiate Error Log And Query Log? Logs Not Being Generated
mysql> show variables like 'log';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| log | OFF |
+---------------+-------+
1 row in set (0.00 sec)

mysql> set global general_log=on;
ERROR 1193 (HY000): Unknown system variable 'general_log'
mysql> set global log=on;
ERROR 1193 (HY000): Unknown system variable 'log'

View Replies !   View Related
How To Import Csv File (generated By Openoffice) To Mysql Database?
how to import csv file (generated by openoffice) to mysql database?

View Replies !   View Related
Set A Data Item Value Depending On A Generated Record Number
how to SELECT a running total of the records being returned from a query when the line number is not provided.

I am downloading product lines belonging to an order from a table using
Expand|Select|Wrap|Line Numbers

View Replies !   View Related
Using A DB In A Website
I want to create a website where users can select (from a dropdown box) and then view various PDF files. I also need the capability to upload and store these PDF's.
What's the best way to accomplish this?

View Replies !   View Related
MySQL On A Website
I'd like to create a website with a MySQL database to store soccer players
details like goals scroed for the season. I want to use it to update my
fantasy soccer team through this season, does anyone know of a free host
that provides MySQL?

Or even better, does anyone have experience of this? I've created an ASP web
interface to an Access database and read/written to it like that in the past
so I assume it's the same for MySQL.

View Replies !   View Related
Website Error
I have image hosting website. When I type in the the website name in the address bar of the browser, I get the following error:

Couldn't connect to database server: Access denied for user: 'imgbiz@linhost120.prod.mesa1.secureserver.net' (Using password: YES)

I am not very familiar with PHP or MySQL. Could someone let me know if it makes any sense or what I should be doing to correct this error? (it would help if someone might have had this error and resolved it, could help me out here)

I have changed the username, because it was much more easier to remember. Does this cause any problems in the website being displayed? I have changed it going through phpMyAdmin/admin. Is there any other file that I need to change this information so that it works?

View Replies !   View Related
HOW DO I USE MYSQL WITH MY WEBSITE?
I have an existing website with Netfirms and it comes with "mysql" "php" etc. It is active and have been able to confirm that with tech support. I purchased two books regarding "php & mysql for dummies" and "biginning php5,Apache, mysql Web development" and still I donot have a clear understanding of how to write a script that will allow a website user to interact and or collect information and display information on the website page. I mean this is what it is all about right? Can someone please just give me an example that I can follow on how to actually creat a script to allow mysql to interact with a webpage. And while your add it. whats a good learning tool, book etc to have?

View Replies !   View Related
How Do I Set The Tables For My Website
I have usually done my websites with Access and all I had to do was transfer a MDB file, and put the path in the data connection and it was working. How do I do this with mySQL?
Do I upload a file(s) and change the datapath or???

I am using ASP (not .NET) and the server is hosted elsewhere by a local company.

View Replies !   View Related
MySQL For My Website
I would like to use MySQL for my website, what should I do?.

View Replies !   View Related
Website & Intranet - 1 DB Or 2?
I've been working on our company intranet for some time now and it's finally (more or less) been completed. The next phase is working on our internet website. The website will offer merged functionality (ie online quoting that is available to employees on the intranet, etc) and I was wondering the best way to tackle this project.

My first thought is that the databases should be separate. That is, one for the intranet, one for the website. If at such time I need to gather data from both I can run a query and simply select the database to use.

My question is: is there a reason that I should use two separate databases instead of just using separate tables - besides perhaps the fact it might be easier to manage?

If anyone out there has done similar in the past, what did you find out/learn?

As mentioned, some of the functionality will cross. For example, when a potential client enters information to be provided a quote, that information, based on certain characteristics (name, etc) will be made available to certain employees for the purposes of quoting and providing that quote to the applicant. I can see where I would need to be able to use information from both databases to run a query for this, so it might be easier if it's all in one table. However, there will be personal information so security is of concern also. Does using two separate dbs help in this regard? Either way, there are security measures in place to protect the integrity of the data but I'm curious if this "extra" layer is necessary.
(This is a php/mysql integration btw which may have been obvious.)

View Replies !   View Related
Database Driven Website
We want to develop database driven website. because of enormous amount
of data (300GB)
customers's tech advisors are insisting on using SAN instead of any
direct attached storage method.
I want to know what issues need to be considered while using SAN in
web solutions.? Which database
server/ product is best suited for such kind of job ? Can anyone
suggests
good informative articles on this subject , available on web?

View Replies !   View Related
Double Quotes Appear As ? On Website
I have an Excel file (which is converted to csv by a tool and then
uploaded to a MySQL database) and then php is used to display the
data on the website.

In the Excel file i have text fields which has data containing double
quotes. They end up appearing at ? question mark on the website. Any
idea how to dispaly the quotes

Should i be carefull of any other invisible characters in Excel which
can mess up the data.

View Replies !   View Related
Top Pages Visited In A Website
How can I select from the database the top 5 pages visited in the website?

View Replies !   View Related

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