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.





Virtual Folder


in my database i have a table which stores a directory structure

folderstructure table
id, foldername, parentid

parentid points to its parents "id" (:p )
i need to retrieve this info so that its sorted by foldername and its children are listed below also sorted by foldername; there can be a infinite amount of nested folders.... im not really sure how to go about this; i was hoping that maybe theres some magical sql statement that can do this for me
i sort of dont want to put this info in a array then sort it with recursion (which i tried and failed), nor do i want loads of sql queries




View Complete Forum Thread with Replies

Related Forum Messages:
Virtual Domain
I have a dedicated server with 5 virtual domains under iis.
i just installed mysql. how do i create a separate instance of mysql for
each of my virtual domain so that one domain affects only tables created by
that domain and not step on tables of other domain?
let's say that each virtual domain is a separate web site with different
fqdn

View Replies !
Virtual Fields
Is there a way to do a mysql select with - for lack of a better word - a 'virtual field'. In other words, I'd like to select on a field that is based on the contents of other fields. Like:
If field A is greater than field B, select field A, otherwise select field B
Specifically, I'm working with date fields. I have a table of events where there is a start date and an end date. Most events are one day only, so they have only the start date. I would like to select and sort on the latest date field - either the end date or, if there isn't one, the start date.

View Replies !
Db On A Virtual Web Server
i am running my web server with dsvr.co.uk. a uk based web server hosting company. I am trying to use a piece of software called smoothflash at the moment to show pics. dsvr have informed me that I have mysql on my server but i cannot for the life of me work out how to connect to a db, een to create a new db. www.smoothflash.com has the install manual on it and it all seems to straight forward. I know I have enabled mysql on my server, this has been varified by dsvr. but then I have no idea how I am meant to create a db, connect to it, i have mysql admin for windows but without knowing how to create a db, get a user name and password for it i have no idea how to get any further, if any of you clever people out there could help me in this matter i'd forever be in your debt.

View Replies !
Virtual Column
I want to get users informations from multiple tables and each user has many dependants (in tbl_dependants) and the dependants table has user_id foriegn key. Is it possible to SELECT user informations and beside the user results I create a virtual column contains dependants names for each user?¿?

View Replies !
Mysql To Virtual Domain
I have a dedicated server with 5 virtual domains under iis.

i just installed mysql. how do i create a separate instance of mysql for
each of my virtual domain so that one domain affects only tables created by
that domain and not step on tables of other domain?

let's say that each virtual domain is a separate web site with different
fqdn

View Replies !
Using Virtual Column In WHERE Clause
SELECT IF( some_id > 3, 'foo', 'bar' ) AS 'virtualcolumn' FROM table WHERE virtualcolumn = 'foo'

MySQL will complain that 'virtualcolumn' is unknow in WHERE clause.


However, if I have another query like

SELECT IF( some_id > 3, 'foo', 'bar' ) AS 'virtualcolumn' FROM table ORDER BY virtualcolumn ASC .

View Replies !
Not Working With Virtual Host
I set up a virtual host with Apache and my previously-working MySQL configuration now will not work! I did this a long time ago and can't remember how to fix the problem...Do i need to change some configuration so that MySQL runs on the virtual host and not localhost?

View Replies !
MySQL Virtual Hosting
When you create a new user, let's call him "userJohn", is it possible to set a different data foler for that user?

I was thinking it would be great if you could keep user databases seperate from each other, kind of like every user has thier own folder on a virtual database folder, and access can be restricted for that user to the databases in their folder.

So if user1 creates a database named "Database1", and later user2 creates a database with the same exact name, it will not give an error, and when user1 alters his "Database1," it will not effect any other users "Database1". Similair to webhosting, where every user has their own folder they keep thier data in.

View Replies !
Chew So Much Virtual Memory On Windows?
Have a fairly busy MySQL server using MyISAM and InnoDB tables on Win 2003 with plenty of available RAM (total 4GB, with about 1.5GB unused) which is using a massive amount of virtual memory despite having tweaked MySQL to use as much memory as it needs. RAM usage never gets much above 400MB, however Windows is reporting that MySQL is using a massive 1.5GB of virtual memory.

Most other processes use a similar amount of RAM and virtual memory, so why would MySQL be using 4~5 times more virtual memory than physical memory? Especially when there is so much free physical memory?

View Replies !
MySQL VmWare Virtual Machine - Password?
I just downloaded and installed the MySQL-provided VMware linux virtual machine. To logon to it there is a linux user 'lxuser' provided. Anyone know the password for lxuser? root?

View Replies !
Create New Db In A Specified Folder
is it possible(and how?) to make a new database in a specified folder -
i.e. /home/me/mysqldb? or how may i install mysql on debian to use this
folder for data files?

View Replies !
SQL Database In Any Folder
I have been using Access for my website databases and I want to use MySQL now. With Access I can put the MDB file anywhere, in any folder of my site and just have Coldfusion MX link to it.
Can I do the same thing with MySQL database files? Do they HAVE TO STAY in any particular folder or can they sit in any folder?

Exmp: wwwroot/site/database/db.opt OR db.MYI

View Replies !
Folder On The Server
what folder a usual mySQL is in on a server that uses apache based Cpanel? I have root access to my server and need to adjust a mySQL file according to some info I found in mySQL.com but I can´t find that file nor the folder for mySQL on my server, so I wonder wether anyone of you could give me some "usual" folder where mySQL could be in.

View Replies !
Extracted Folder
I recently had problem with my installed MySQL (5.0.24a Standard) on my Mac PowerBook G4 (Tiger 10.4.9 uk).
MySQL doens't launch anymore.
To be sure to not lose my main database ('imagebank'). I copy the entire folder of 'imagebank' on my desktop.
After tried lot of tricks (to try to launch again MySQL), I decide to reinstall the 5.0.41 packages.
Now MySQL launch again, but How can I import the folder of my 'imagebank' database?
Because I tried to placed back the entire folder (by drag'n'drop') but can't reach the infos (via phpMyAdmin 2.10).

View Replies !
How To Run MySQL From Another Folder?
trying to build an application with Ruby on Rails (I'm learning) and I'm following the tutorial but it's not very well explained.

It's like I have to write a MySQL command into another folder (my application folder) and it doesn't work.

Here's what the tutorial is asking:

" After I make sure I'm in the cookbook2 directory, I enter:
mysql cookbook2_development <dbcreate.sql "

But of course, it doesn't work because "mysql" command only works when I'm in the MySQL folder! Everything else seems fine (the file create.sql exists, the cookbook2_development database is created, etc).

View Replies !
Database Folder
Do my databases have to reside in the mysqldata folder? If not,how do I change my connection string in ASP to specify the path - I'm using:

objRecordset.ConnectionString = "Driver={mySQL ODBC 3.51 Driver}; Server=localhost; Database=cmf; Uid=root; Pwd=yeha; Option=16384; "

Also,is there a usual place on a server to put mysql databases (linux/apache)?Do I need to specify a path to the DB?

View Replies !
Share Folder On XP Computer
I share a folder on an XP Pro computer across our peer to peer network.
I have add users to the XP Pro computer for network login.
If users on our network edit the MS Access 2000 file no problems occur.
But if I edit the MS Access 2000 file on the XP Pro computer itself all
users are removed from the security tab on the MS Access file except admin
and me.

View Replies !
Copying Data Folder
I've successfully copy out a database folder under mysql/data directory and put it in another server and it works fine. No need to know the previous admin password or what for the copied database.My question is. Is this normal with mysql? Or this is normal with all DMBS, which we can copy the data folder from one server and put it in another servery, bypassing all the user security, and successfully read the database with admin privilaged given by the second server?Or this is only happened with mysql, and not with other DBMS such as ms-sql and oracle.Is there anyway to prevent this from happening?

View Replies !
Move C:mysqldata Folder
is it possible to move the mysql's data folder to another drive, for example from the default c:mysqldata to d:data?

View Replies !
Backup Mysql Folder?
I run my own server based on Windows with MySQL 5 and I want you to put my mind to rest about backups .. .At the moment when I perform a backup, I just backup the whole of the C:Program filesMySQL folder (that contains all of the databases). Is this going to be ok to restore from if ever I have a hard disk failure, or do I need to mysqldump my databases?

View Replies !
Recover From Old Data Folder
I want to know that if I only have a previous MySQL Data Folder left, without any dumps, and I replace the new DATA folder with the old DATA folder, will it work.

View Replies !
Data Folder Structure
I am doing a data migration from access to MySql. I will like to know if I can create various master folders inside the data folder, where each of these folders will hold various databases inside the data folder. For example: One folder call Clients, that will hold databases for each of my clients.

View Replies !
Mysqldump Or Data Folder
I am trying to get a backup strategy in place for my customer. Here is what the software developer said about their software that uses MySQL 4.xx running on Windows Server 2000.

Is this true? I do not see how this is possible.

What we have learned with MySQL is you do not need to run a special backup to backup MySQL databases. The contents of c:mysqldata (or if the MySQL engine is physically located in another location, the data folder within that MySQL folder) can be backed up at any times, as the files open and close per request. If you have a scheduled tape backup, include this folder in the backup. If needed to recall this information, all we need are the entire contents of this folder, and you are back up and running, instantly.

View Replies !
Restoring A Database From The Data Folder
I was running a Windows Server 2003 machine and had a Hard Drive go out on me. I was able to save all the data on the drive in it's raw format, but had never made any backups (I know, dumb). I took the opportunity to install Mandriva 2006 instead of going back to windows. I now have a MySQL 4.1.12 server running and Would like to restore my data from what I saved in the data folder.

So my question is this. Is it possible to restore the data that was saved in the windows data directory into the new database running on the linux machine? And if it is, how would I go about doing that?

View Replies !
Load Data From Mapped Folder
I have a mapped drive "O" on the PC running MySql. I want to use 'load infile'
Tried the following:

load data infile local 'O:/abc/boxes.txt' into table `boxes`;
I've also tried :
load data infile 'O:/abc/boxes.txt' into table `boxes`;

I always get "Error 1064". If I change the path to the local drive, it works fine. Having the text files locally is not an option. Any suggestions?

View Replies !
Moving The Mysql Data Folder
We have a system that has been running for about one year. The thing is that the mysql data folder is on the c: partition and the diskspace is low, I wan't to move the data folder to the d: partition where it's lots of free diskspace.

So my question is can i stop the mysql server copy the datafolder to the d: partition and edit my.ini regarding the path for the datafolder and start up the mysql server again without bumping in to problems??? Or is there any other suggestions on how to solve this?

I'm going to move the folders on 2 servers (master-- slave mysql servers)

View Replies !
Accessing Remote Data Folder
I have MySql 4.0.17 server on my machine. My data

folder is on a network drive. Recently I installed

MySql 4.0.17 on a different machine, changed the my.ini

file to point to the same remote data folder and

restarted the MySql. I get the following error-

"Could not start the MySql Server on local computer.

Error 1067: The process terminated unexpectedly".

So I copied the remote data folder onto my local

machine and changed the my.ini accordingly, it is

working perfectly fine. The storage engine is Innodb. Am I missing something here.

I am pasting the contents of my my.ini file below. Code:

View Replies !
DATA Folder On External Drive
I have one question: my DATA folder has been moved to an external drive, simple plug & play for Windows XP.

At night I simply turn off the drive and that's it. If I need it, I power it back on.

Last night to test, I shut the drive off, then powered it back up. MySQL couldn't find my schemas. Reboot and everything is fine. I plan on testing this for a while just to be safe.

Anyone see any long-term problems with MySQL and the drive suddenly being un-available ? Any suggestions ? (like shutting down via admin prior to power-off).


View Replies !
What Files Are Need From The /mysql/data Folder??
obviously the DB folders are needed

but can i delete

servername.err
ib_logfile0
ib_logfile1
ibdata1

from an old directory and move the DB folders to a new installation??

View Replies !
File And Folder Structure With Mysql
laying out my DB design right now and the application will allow users to create folders with subfolders and place files in each of these folders or subfolders.

could anyone provide some insights as to how the DB design should function to record the directory structure that each user has designed for themselves?

i have one table with the folder names, then another table with subfolders, but what if in that subfolder, there is another subfolder? do i allow the program to automatically create another table for that subfolder that links to the subfolder before it through an ID?

View Replies !
Folder-and-file-like Object Relationship Implementation
I'd like to develop something which has a concept like the
folders-and-files in your PC.

A folder can have subfolders and/or files. The subfolders themselves
have the same characteristics.

This characteristic can also be found in Google Newsgroup, aka Usenet.
A group can have many postings and many other groups.

I want to reapply this concept for listing contents for categories,
not unlike the categories one can find in Yahoo. For example:

The root has many categories: Electronics, Art, Entertainment, etc.
Under Electronics there are subcategories such as cameras, washing
machine and refrigerators. However, here's the twist:

When I select Electronics, I want all items under all subcategories to
be listed as well. That means I need to traverse to every descendant
categories to view all items under them.

If I start out with two tables, CategoryTable and ItemTable, how
should I design their relationship and how should the SQL query be
constructed ?

View Replies !
Where Are Located The Data Files, In Which Windows Folder?
I have imported a text file (11Go) in DBName.Table1 and i would like to know where are the data files on a WXP system.

I know where is the DBName directory but there is only a Table1.frm (2ko) file.

I use the innodb engine. ibdata1 (1.4Go)

The record has 17 fields: 13 int + 1 tinyint + 2 Varchar(15) + 1 Datetime,
either at less 70 bytes/record x 100Million records, either at less 7Go.

View Replies !
Can I Access Databases By Placing Outside Data Folder?
Can i access MySQL databases if I save them in my own locations? Means, not in c/program files/MySQL/data but in d:/ or E:/ drives?

View Replies !
How Do I Reclaim Disk Space In Data Folder
I have 5 databases:

- mysql
- test
- product1
- product2
- product3

The hard disk on my server was near full, so I decided to delete databases product2 and product3 as I no longer need them. I dropped the databases product2 and I noticed the disk space was not freeed by MySQL after dropping this database. The tables in databases product2 and product3 are INNODB.

What is the best method to reclaim my disk space when dropping entire databases?

View Replies !
Copy/Paste DB Folder From Mysql/data
I swear once upon a time I was able to simply copy my DB folder
from mysql/data folder and paste into new install (wamp) and so I tried
just that today thinking all would be right.

I dumped the wamp stack, and reinstalled, pasted the db folder back into
the new mysql/data folder, and while phpMyAdmin shows the db in the list
(with the correct number of tables) I get an error that that the first table
does not exist! BIG BUMMER!!!:eek:

How might I retrieve the data from this folder or otherwise resolve the error?

View Replies !
Create Virtual Table During Query Or Load Table To Memory From Text File
I have access to my application database via a secure link, so I cannot link a local database to it, only run queries on the remote server and download the result.

The database is missing some useful information, and I cannot add a table at this stage. I would like to achieve the result by creating a virtual table or the like. ...

View Replies !
How To Refer To A Virtual Table Created By Sub-query In Other Sub-query?
how to refer to a virtual table created by sub-query in other sub-query?

like this:

select ... FROM (select....) as C where xyz=(select ...from C) ..;

it returned error table C does not exist

View Replies !
Mysqldump From Server To Server OR Move Folder /var/lib/mysql?
I need to move db's from a live server to a new server. The new server will be replacing the existing server once it's setup, and I need to move the DBs in order to do the testing.

My question is this; if I use mysqldump to get a dump of all the DBs on the existing old server, and then import that .sql file to the new server, will that copy over *EVERYTHING* i need to get the DBs working again? Privilages etc ?

The alternative that I am considering is to move the /var/lib/mysql folder along with mysql.cnf. That should work, as we can change any locations in the mysql.cnf file, but it does mean taking the server offline while we tar the databases, which could take 30 mins or so.

View Replies !
Killing One Virtual Console Process From Another (IE, Killing Console Session ALT-F1 From ALT-F4)
On the subject of switching between virtual consoles to get
out of a 'hung' situation in the primary console...

What I have been doing is pressing LEFTALT-F4 to bring up
a 2nd virtual console, logging in as root and running poweroff
to close EVERYTHING down. All I really wanna do is terminate
the hung console session. Can I do that from the 2nd virtual
console without having to power down & reboot linux? Code:

View Replies !
Get Data From Data Folder
My server recently broke and I had to reformat it. Being the stupid noob I am I only had a backup of the servers files and not the sql tables. I have all the original mysql files and I was wondering if there was a way of getting the data on to a new sql server.

View Replies !

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