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




Table Creation Based On User Login


I'm trying to build a website that will allow the addition of users (w/ username, password, etc.).

That seems simple enough.

But is it possible to set something up (in PHP, for example) that will create a new table in the database for each new user?

Ex. John Smith signs up, is verified, and a PHP script (or Java, or whatever) creates a table specifically for him.

I know I'll need a master table of usernames, passwords, etc. These new tables would store certain user-specific data, such as preferences and other data the user might want to restrict access to.

I know I could store all of this information in a master table, but I'm trying to think ahead. Worst case scenario, if there are millions of users (unlikely, but not impossible), I'd hate to have all that data in one table, but if I have to, I can.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Login Page Creation
i am trying to create a login page on my site with user name and password i mainly work in dreamweiver on a mac platform.

how can i use the mysql database to store the information and link dreamweiver to get the info i have no idea how mysql works so you have to be patient with me and guide me step by step.

Populating Matrix Table Based On Books Taken By User
I've been trying to do this for 2 hours now. My noobness in mysql is not letting me get through =(

USERS:
id_user | f_name | l_name
1 | mike | smith
2 | david | bush
etc...

BOOKS:
id_book | s_name | l_name
10 | book 1 | walking together
20 | book 2 | straight path
21 | book 2A| crooked path
etc....

REGISTRY:
id_fk_user | id_fk_book
1 | 10
1 | 21
2 | 10
2 | 20
2 | 21
etc....

Now, I am trying to fill out a table by row using pear's HTML Table that would end up like this:

Name | ID | Book1 | Book2 | Book 2A | etc..
mike smith | 1 | x | | x | etc..
david bush | 2 | x | x | x | etc..

I am having a hard time because the table wants each row's data separetly before it send it to HTML output. And my SQL statement looks like this:

SELECT id_user, f_name, l_name, id_book
FROM USERS, BOOKS, REGISTRY
WHERE id_user = id_fk_user
AND id_book = id_fk_book

which gets me:
1 mike smith 10
1 mike smith 21
2 david bush 10
2 david bush 20
2 david bush 21

USer Accounts Creation With MySQL
I am trying to create a website that uses ASP.NET interfacing wth a MySQL database, this is more of a Design based question (I think!). I need users to automatically register an ccount online and create entries within the tables in a specific database.

How do I manage this, do i have to create a new user each time by the query GRANT? If so I am planning to have many users logging in to a big table that has a lot of other data for other users (they will be identofoable by an ID column i.e Joe_Bloggs). what do I set as permissions to that particular table, as potentially they could change someone elses information.

I may just need a pointer to how you actually go about designing a system as I have described and manage all the users information to allow a good level of security and scalability for expanding the application at a later date.

Is it better just to create a new table within the databse each time a new user is created as that way I would be able to grant that particular table (i.e. Joe_Bloggs_Table) the correct permmisions.

User Creation With Mysql Command Line
why i can't connect to mysql using command line with account that I created from this one ( using command line),but I can connect to it ( from command line) ,if i created with phpmyadmin console.

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.

Login Error User Denied
I get this error trying to login to our new WEB sites MySQL database
Cannot connect to specified instance

MySQL error number 1045
Access denied for user doda@somesite.com (using password YES)
if you want to check the network use ping button

Unauthenticated User Login Hangs?
Having some issues with a new MySQL system. We're running the 64-bit version of MySQL 4.1.11 on Fedora 3. MySQL was installed from the original RPMs.  The server is a dual Opteron system, 4 gigs of memory, 15k RPM SCSI drives, gig network, etc. We replaced our old server, which was running version 4.0.17 with this box.

For the most part, things have been working great (and very fast!) so far. However, a couple times we've had everything hang on us while waiting for mysql to authenticate a new connection. Running a show processlist shows the strings like this: Code:

User Not Needing Password For Login?
I've seen this problem for a while now, but since at the time I only needed 1 MySQL user for development purposes it wasn't a problem. Now, it's problematic.

Btw, I have MySQL 5.0.22 installed.

I created a user using the following command (I've tried this way and using GRANT):

INSERT INTO user
VALUES('%','XXXX',PASSWORD('YYYYY'),
'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y',
'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y',
'','','','',0,0,0,0);

Now, I see that row in the mysql.user table. I see the encrypted password, BUT when I try to log in to mysql from the command prompt using the user that I just created... it NEVER needs the password (YYYYY) that I set it to in the INSERT.

>> mysql -uXXXX

^ That command takes me straight to the mysql command prompt. I am wanting the command to have to be 'mysql -uXXXX -p'... and then prompt for the password. Am I missing something?

User Based PHP W/MySql
If I were to take a few different (gpl released) php programs that use MySql databases for the user data, could I integrate all the users into one database?
For instance, a user signs up in one of my forums, and their info is stored in a database. Then if they go to my auction script using the same database, they don't have to sign up again.

My guess is that yes it would work, but I'd have to go through each php file and edit where it called for the table data in each database to point to the same places.

Table Creation Sql
Is there any way to have MySQL supply the SQL used to create a table?
Sort of like it does using the command line mysqldump tool, but direct from the actual MySQL server (i.e. one I could use to get the SQL from MySQL using PHP)?



Table Creation
I'm creating a table and would like to get the system date for my date column. How would I do this.

I tried to use

date date SYSDATE

with no luck.

Also when adding values to the DB, would I insert anything in this column or just leave it out like and autoincrement column??

Table Creation
I tried using MySQL Admin, but am finding that it is buggy AND I am having touble creating a table with an auto increment key as well as setting another field UNIQUE.
Would it be easier for me to create my tables manually or is there less buggy freeware out there for table creation?

SQL Table Creation Query
how can one get the sql query with which a table was created?

Table Creation Syntax
The following was produced by the latest version of EngInSite from a database in existence on the server (4.51) where I want to replicate my database. I'm getting a syntax error message. Can anyone here see a problem with this? Code:

Table Creation Date?
Is there a way to retrieve table creation date(creation date of frm file) from PHP?

Table Creation Error
I'm getting a MySQL error creating my table (see image's below). I'm compltely puzzled, it looks fine to me!

Full Text Table Creation
i am just trying to implement fulltext .I have created the table as
CREATE TABLE `mytable` (
`mytable_id` int(25) NOT NULL auto_increment,
`mytable_title` varchar(100) NOT NULL default '',
`mytable_dts` varchar(25) NOT NULL default '',
`mytable_caption` tinytext NOT NULL,
`mytable_full_body` text NOT NULL,
PRIMARY KEY (`mytable_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Testing Full Text Search Functionality.'
is it correct or
the below is correct
CREATE FULLTEXT INDEX full_index ON mytable(
mytable_title ,
mytable_caption ,
mytable_full_body
);



Need Help To Debug Table Creation Error
I'm trying to install a software package on my server and when I try to import the .sql file I get an error on the following table creation statement:

DROP TABLE IF EXISTS general;
CREATE TABLE general (
id bigint(20) DEFAULT Ɔ' NOT NULL auto_increment,
last_name varchar(40) NOT NULL,
middle_initial char(1) DEFAULT ' ' NOT NULL,
first_name varchar(40) NOT NULL,
work_phone varchar(20),
extension varchar(4),
cell_phone varchar(20),
job_desc varchar(80),
department varchar(30),
site varchar(30),
pager_pin_number varchar(20),
pager_company varchar(20),
pager_phone varchar(20),
email varchar(160),
web varchar(160),
PRIMARY KEY (id),
UNIQUE id (id),
UNIQUE last_name (last_name, middle_initial, first_name)
);
The error I get is:

#1067 - Invalid default value for 'id'

I'm using Mysql version 4.1.20

Any ideas?



Table And/or Database Creation Time
Is there such thing as a table or database creation time in the SQL
standard, that you could avail yourself of?

I mean do databases keep this info. I think they do since they are
like little OSs and many of them have internal back up features, that
must use some kind of timing.

Syntax For Table Creation In Server Version 4.0.25
I was trying to install something in a php postnuke when I got a syntax error in the table creation of MySQL. The following is the error I recieved:

_PNC_DBCREATETABLEERROR - (users) - 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 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMES

I was wondering if someone can take a look at the syntax I'm trying to use and offer a suggestion as to how to fix it. I have almost no knowledge of MySQL, The server version that my webhost is using is MySQL 4.0.25 standard, client version 4.1.10. Code:

Phpmyadmin Export Problem With Order Of Table Creation
This is a phpmyadmin question more than anything, but I hope someone may be
able to help. When creating a dump of a normalized database with 26 innodb
tables, phpmyadmin export seems to only export the table structure/data in
alphabetical order, rather than FK contraint order.

Thus when importing the
dump of the data, I need to manually go through and select the order to make
sure the constraints hold up. Has anyone else seen this? I'm running
phpmyadmin 2.5.4 on both linux and win xp.

Displaying User Last Login Like "3 Days, 2 Hours Ago"
I have a table "user" with a field "lastlogin" that stores a basic datetime of the last time the user logged in
Do you know of a fast function or class that can convert that field into a more readable "User last logged in: 3 days, 2 hours ago" or something similar?
I've seen this everywhere and I don't like reinventing the wheel

Random Password Vs. User Created Password For Site Login
Are there any security issues or other concerns that make one preferable? The client is pushing for user created passwords.

I'm mapping out the basic functionality and front-end for a MySQL/PHP back-end that will be completed by a third party. I'm a novice to MySQL but familiar with PHP and their interaction. Mainly looking for anything to support one method over the other.

Updating Rows In Table B Based On Related Field In Table A
Ver 4.1.8-standard for apple-darwin7.6.0 on powerpc (Official MySQL-standard binary)

I am trying to do some data migration based. I have several tables that contain our legacy pkey field and I want to update the tables with new ID's.
I need to do this several times and have tried it several ways to no avail.

Table A
---------
companyID int(10) pKey
legacyID int(10) old legacy pkey

Table B
---------
bAID int(10) pkey
companyID int(10)
legacyID int(10)

Table A has values for both companyID (unique key) and legacyID.
Table B has values for bAID (unique key) and legacyID but companyID is empty.

I need to update tableB.companyID with tableA.companyID based on tableb.cSerialID to tablea.cSerialID relationship.

I need a query that will update ALL rows.

Updating Table Based Upon Matching Field In Second Table
I have a database of books that was originally created as a flat file.
Each record has a number of fields, including the authors name. I'm
trying to convert the database to something a little more efficient.
I've created a new table (called Authors) of unique authors names and
assigned each one a unique ID. I've added a new field in the original
table (called Books) for the author's ID. Now, I need to update the
original table with the author ID from the Author's table.

Something like this:

UPDATE Books SET AuthorID = Authors.AuthorID WHERE AuthorName =
Authors.AuthorName

This obviously doesn't work. Any assistance on how to forumulate this
query (or, if I'm headed down the wrong path, the correct way to do this
operation) greatly appreciated.

Selecting From A Table Based On Info In Another Table
Essentially this is what i want to do. I have two Tables,

Table A- has the field "id" which is the primary key
Table B- has the field "id" which is the primary key

Select * from tableA where Table A.id is not in tableB.id

How can i form a statement that will accomplish the above.

Selecting From A Table Based On Info In Another Table
Essentially this is what i want to do. I have two Tables,

Table A- has the field "id" which is the primary key
Table B- has the field "id" which is the primary key


Select * from tableA where Table A.id is not in tableB.id


How can i form a statement that will accomplish the above.

UPDATE Based On Value In Another Table
How do I update a table to remove orphaned references to a second
table? I've deleted rows in the second table, which has a unique
auto_increment key. The first table now has references to keys that no
longer exist. I need to update the first table, setting the value to
NULL where the referenced key no longer exists. Something like:

UPDATE table1 SET table2ID = NULL WHERE table1.table2ID NOT FOUND IN
table2.ID;

The NOT FOUND IN isn't SQL, of course, but I'm not sure what should go
there.

Update Based On Other Table
I know this is how this query would be written in SQL but I think something isn't working correctly since this is mySQL.

SQL query:
UPDATE watches SET watches.totalhits = ( SELECT COUNT( id ) AS totalhits
FROM watchtracker
WHERE watches.id = watchtracker.watchid )

MySQL said:
#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 'SELECT COUNT(id) as totalhits
FROM watchtracker
WHERE watches

UPDATE Based On Value In Another Table
How do I update a table to remove orphaned references to a second
table? I've deleted rows in the second table, which has a unique
auto_increment key. The first table now has references to keys that no
longer exist. I need to update the first table, setting the value to
NULL where the referenced key no longer exists. Something like:

UPDATE table1 SET table2ID = NULL WHERE table1.table2ID NOT FOUND IN
table2.ID;

The NOT FOUND IN isn't SQL, of course, but I'm not sure what should go
there.

UPDATE Based On Value In Another Table
How do I update a table to remove orphaned references to a second
table? I've deleted rows in the second table, which has a unique
auto_increment key.

The first table now has references to keys that no
longer exist. I need to update the first table, setting the value to
NULL where the referenced key no longer exists. Something like:

UPDATE table1 SET table2ID = NULL WHERE table1.table2ID NOT FOUND IN
table2.ID;

The NOT FOUND IN isn't SQL, of course, but I'm not sure what should go
there.

Making Site Login Add Users To Phpbb Database Table
I have a login script for my site that I got off the net and was planning to use, but, I also wanted to make it so that when a user signed up thru the registration form it would also add them to the phpbb database's table. It wasn't discussed heavily from where i got the script but from what was mentioned the encryptions differ which results in a rejected login. Code:

Updating A Table Based On The Value In Another Table In Ver 3.23.54-Max
I am trying to update fields in table SOLAR_SYSTEM based on the values in RESEARCH_LEVEL table

This is a SQL that I am trying to use

UPDATE SOLAR_SYSTEM JOIN RESEARCH_LEVEL ON SOLAR_SYSTEM.USER_ID=RESEARCH_LEVEL.USER_ID SET
SOLAR_SYSTEM.CASH_METAL=SOLAR_SYSTEM.CASH_METAL+1000,
SOLAR_SYSTEM.CASH_CRISTAL=SOLAR_SYSTEM.CASH_CRISTAL+1000,
SOLAR_SYSTEM.CASH_ENERGY=SOLAR_SYSTEM.CASH_ENERGY+1000
WHERE RESEARCH_LEVEL.TYPE='M' AND RESEARCH_LEVEL.LEVEL=1;

I got error

"ERROR 1064: You have an error in your SQL syntax near 'JOIN RESEARCH_LEVEL ON SO
LAR_SYSTEM.USER_ID=RESEARCH_LEVEL.USER_ID SET
SOLAR_SY' at line 1"

I don't know what is wrong. Can I do such an update in Ver 3.23.54-Max in the first place ? IF yes, then what's wrong with my statement?

Table Based On Info In Another Table
Essentially this is what i want to do. I have two Tables,

Table A- has the field "id" which is the primary key
Table B- has the field "id" which is the primary key


Select * from tableA where Table A.id is not in tableB.id

How can i form a statement that will accomplish the above.

Update One Table Based On Count From Another
I heve two tables Publishers and Books.

Publishers has:
PublisherID
PublisherName
BookCount

Books has:
BookID
PublisherID
BookName.

I want a query that will update the BookCount field for every Publisher taking the number of books each one of them has in the Books table.

What would be the mySQL Update query for this?

Hope I have given enough information. I will gladly provide more.

Detecting Duplicates Based On One Field In A Table?
I can't seem to find an answer anywhere for this as most people want to delete duplicate records.

I have a table, lots of fields, one of which is "title". I want mysql to return all the rows where "title" is the same. For instance if "title" was "Lord of the Rings" on id = 1 and id = 2, then the query would return both of the records, but ignore the others. It doesn't matter what the other field values are.

I have found some
SELECT COUNT( * ) AS num_entries, title
FROM title_table
WHERE title >1
GROUP BY title

But this doesn't seem to work, although looks like it's on the right sort of lines?

I'm not a Mysql expert, so my experience is mostly limited to the usual select, insert, update and delete queries!

Update Based On Row Offset From Begining Of Table?
Is there a way to update a table row based on its offset from the begining of the table. I want to be able to update based on a rows position when its brought up when all rows in a table are selected. ie; select * from table.

Counting Levels On Adjacency Based Table
Does anyone know a single query that could successfully count the number of levels in a table based on the adjacency model?

By "number of levels", I mean the number of LEFT OUTER JOIN that needs to be used in a query such like this one :


SELECT
level0.cat_ID AS level0_ID, level0.cat_parent_ID AS level0_parent_ID, level0.cat_name AS level0_name,
level1.cat_ID AS level1_ID, level1.cat_parent_ID AS level1_parent_ID, level1.cat_name AS level1_name,
level2.cat_ID AS level2_ID, level2.cat_parent_ID AS level2_parent_ID, level2.cat_name AS level2_name,
level3.cat_ID AS level3_ID, level3.cat_parent_ID AS level3_parent_ID, level3.cat_name AS level3_name
FROM ecom_categories AS level0
LEFT OUTER JOIN ecom_categories AS level1 ON level1.cat_parent_ID = level0.cat_ID
LEFT OUTER JOIN ecom_categories AS level2 ON level2.cat_parent_ID = level1.cat_ID
LEFT OUTER JOIN ecom_categories AS level3 ON level3.cat_parent_ID = level2.cat_ID
WHERE level0.cat_parent_ID IS NULL
ORDER BY level0_name, level1_name, level2_name, level3_name

List Available Items Based On Prerequisite Table
I'm trying to develop such a scheme:

TABLE Prerequisites
PrerequsiteID (FK to Upgrades table; states a prerequisite for UpgradeID in the other column)
UpgradeID (FK to Upgrades table as well)

TABLE BuildingUpgrades
BuildingID (FK to Buildings table)
UpgradeID (FK to Upgrades table; states what Upgrade Building already has)

So it's a Building -> Building_Has_Upgrades -> Upgrades -> Upgrades_Have_Prerequisites thing (Building has 1..n Upgrades, Upgrade has 1..n prerequisites). In order for Building B to have an Upgrade U, that Building B has to have all the Upgrades which are required to have Upgrade U.

What I want to do is to list all buildings with all upgrades available for them. I've been trying for almost whole day to solve this issue with different inner, left and right joins, subqueries and what not but I can't really do it in a clean way.

The only working thing is a query, which I am ashamed of because it seems like a real waste of CPU time to me:

SELECT BUPG.BuildingID, PRE.UpgradeID, COUNT(PRE.PrerequisiteID)
FROM BuildingUpgrades BUPG
JOIN Prerequisites PRE ON BUPG.UpgradeID = PRE.PrerequisiteID
GROUP BY BUPG.BuildingID, BUPG.UpgradeID
HAVING COUNT(PRE.PrerequisiteID) =
(
SELECT COUNT(PrerequisiteID)
FROM Prerequisites
WHERE UpgradeID = PRE.UpgradeID
GROUP BY UpgradeID
)

What it basically does is takes all the available Upgrades, counts prerequisites that have been met by the building and checks if it's equal to the number of all prerequisites for that Upgrade. And it works but I still think there is a much better way to do it.

Determining Which Table To Query Based On Data Within Tables
I have 2 tables:

default_categories
column 1: category_id
column 2: category_name
column 3: category_parent

custom_categories
column 1: custom_cat_id
column 2: custom_cat_name
column 3: custom_cat_parent

The custom_categories table won't necessarily have anything in it but if it does, I need to choose the data from the custom_categories table over the data from the default_categories table.

So if the default category has 3 rows with IDs | names:
123 | Dogs
456 | Cats
789 | Fish

And the custom category has 1 row with IDs | names:
456 | Very Cute Cats

I want my query of these 2 tables to produce the following IDs | names:
123 | Dogs
456 | Very Cute Cats
789 | Fish

I've tried joins like the one below but they aren't working because if there is no custom_cat_id, it won't give me the result for the default category_id.


MySQL
SELECT *
        FROM default_categories
        LEFT JOIN custom_categories ON category_id = custom_cat_id
        WHERE category_parent = ''
        AND custom_cat_parent = ''
        ORDER BY $order_by $sort




Returning Rows In Left Table Based On Mutliple Criteria In Right
This is starting to get to me. I'm sure there's a simple way of handling what i'm trying to do, but someone might be able to help out quicker than spending another hour searching and testing for this. Here's the problem:
Simplified tables:
ARCADES
=======
ID,
name
GAMES
======
ID,
name
ARCADES_GAMES
=============
ID,
arcade_iD
Games_ID
Straightforward enough so far right? I'm trying to get all arcades that have ALL games in a passed in set of game_id's. So for instance I might want all arcades that have the games 11 and 14, but it must have both those.
I can do soemthing like...

SELECT a.name
FROM arcades a
WHERE EXISTS(SELECT 1 FROM arcades_games
WHERE arcade_id=a.id AND game_id IN (11,14))
But that'll return all rows that match ANY of (11,14) rather than ALL of 11,14.

It all comes down to the simple thing of getting rows in a table where all criteria from a list is met, but any advice on how i would do something like this?

Alter Table Based On Comment Header In Import File
I have a text file which is the output of a Perl script that parses Windows Media Log files into a media analytics table. There are some additional columns which are defined by the customer so the actual table format can and does change. The engineer who provides this table has created a comment header with revision information as well as column names. Is there anything I can do to have MySQL look at the comment header and alter my table to include the newly added columns without destroying any data in the table? The column names would always be in the same line in the import file and when a new field is added, it would be appended to the field list, not added anywhere in between existing fields.

Example:

# FIELDS: client_ip,date_YYYY-MM-DD, time_HH:MM:SS,http_method,c_url,status_code,
total_bytes,transfer_time,"referrer",referrer_host,"user_agent",
total_object_size,byte_range_start,byte_range_end,last_byte_served_flag,
first_byte_served_flag,all_bytes_served_flag, akm_c_ip_country, akm_c_ip_dma, akm_c_ip_lat, akm_c_ip_long,CPROG,MARKET,NG_FORMAT,SITE_ID,STATION_ID,PCAST_TITLE,PCAST_AUTHOR,
PCAST_CAT

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?

User Table In 5.0
I have a question about the "grande" entries in the 'user' table of
MySql 5.0.0-alpha.What is this?
Also, why are there two rows with "root" (one with localhost and one
with "grande")? Why two entries?

Question About User Table In 5.0
I have a question about the "grande" entries in the 'user' table of
MySql 5.0.0-alpha.

What is this?

Also, why are there two rows with "root" (one with localhost and one
with "grande")? Why two entries?

User Table And Version
I am using mysql 3.23.54 that came bundled with RH9. When I do a show =
databases there is no user table, I am working through the reference =
manual for 4.0 is the reason there is no user table because of the =
version? also I have tried updating to version 4.0 using the RPM =
available from the mysql site but on logon the version still says =
3.23.54 and still no user table; any ideas?

Mysql User Table?
I have number of customer and they should have different access levels, some would access only few pages. I thought if i create a table:users in my database: maindata-> table: loginuser: will solve the problem, but something is not right when i saw the default mysql user table.

maindata->table loginuser: columns are
user id autoincrement
userfname varchar
userlname varchar
email varchar
userurl varchar
accessgroup (tinyint) = 1,2,3,4
Depending on this value they will access the specific url with.

However after reading code below, I am bit confused about storing all users, should i use default mysql user table cause it has got all privaleges by default ie., insert, del, modify etc. and sounds more secured cause if by mistake users can type admin.php url? I am new to all this and sort of confused.

PHP Code: ....

Mysql User Table For Authentication
What is the best way to store usernames/password information within a mysql Table? Is there a way to encrypt the columns that house this data?

Sorting A Table According To User Criteria.
I was looking for a some kind of simple solution to this issue. The application requires that certain tables should be showed ordered by the user criteria, for example categories. the user will insert a new category and then he could move up or down the item to the position he wants to show it.

In order to do this, I was thinking to add a column, let's call it 'sort_id' this column will save the position of the record. (this is the best i could come up with, I would love any suggestions). This might create some concurrency problems, but since this is an administration module, I don't think more than one would modify the same table at the same time. Anyway, I couldn't find an easy way to insert a new record in the table with the last position + 1.


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