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.





Windows Based GUI To Manage Tables


What is best GUI to utilize to connect to my db to make edits to tables, etc...?

I thought MYSQL Administrator could do it but I can't connect to my database on a shared server... if this is to the right tool.




View Complete Forum Thread with Replies

Related Forum Messages:
Manage And Copy Data Between Two Tables
I have two tables:

Code:
TableA
referid allthreads
empy 1663
empy 1662
empy 8754
empy 8555
empy 8701

----
TableB
article_id thread_id
10664 1663
10630 1662
1655 1661
10641 1655
10622 1654

I need to copy all the "article_id" entries from TableB into "referid" from TableA that are related between thread_id (TableB) and allthreads (TableA).

So far, my best query, which gives me an error, and probably really wrong, is:

Code:
INSERT INTO TableA(
referid
)
SELECT article_id
FROM TableB
WHERE (SELECT allthreads FROM TableA) = ANY (SELECT thread_id FROM TableB)

View Replies !
SELECT Based On 2 Tables
I'm writing some custom stuff to pull from a WordPress install I have one one of my servers.

For one function I want to SELECT all the rows from one table based on criteria from that table and another table (they are related by the row ID of the first table). Here is the SQL I have now....

sql Code:
Original
- sql Code

SELECT DISTINCT t2.* FROM wp_term_relationships AS t1, wp_posts AS t2 WHERE t1.term_taxonomy_id = '4' AND t2.post_status = 'publish' AND t2.post_type = 'post' ORDER BY t2.post_date DESC

SELECT DISTINCT t2.* FROM wp_term_relationships AS t1, wp_posts AS t2 WHERE t1.term_taxonomy_id = '4' AND t2.post_status = 'publish' AND t2.post_type = 'post' ORDER BY t2.post_date DESC

It seems to be returning too many results. It's just returning all the rows from wp_posts that match the post_type and post_status criteria and ignoring the term_taxonomy_id (from wp_term_relationships) requirement.

View Replies !
Joining Tables Based On Condition
I want to have a field determine what table the field should be joint on. For example, I have a field that is one of eight different values (contacts, leads, accounts, ect...). I want to be able to join on the specific table specified by the field because this field determines what type the id field corresponds to.

View Replies !
Query Based On Data Of 3 Tables
this is what I've been trying to implement:

I have, say, three tables.

One is a user table, with id, username, etc
Second is a question table with Question ID, Question, Category etc
And third is an "answers" table that keeps answers given by the users. It has the classic id key, and Question id and User Id columns.

What I want to do is this:
Select a random question of category 1 lets say from the questions table for which user X has no record of answering in the answers table.

View Replies !
Select And Return Based On The Relation Of Two Other Tables
I'm learning mysql and am looking for an example of how to do a certain type of search.

I have three tables and I'd like to pull records from one and order them based on the relation of two tables. My tables are: ....

View Replies !
How To Query Multiple Tables Based On Value Difference
I 5 tables all with equal columns,but with different values. Per example:

time_start,time_end,num_a,num_b,price etc.

How can I retrieve the values of all columns `price` between tableX and tableY where time_start in table Y is higher as a datetime than time_start in X.
So,the query is about finding the values of `price` between 2 dates in differnt tables.

View Replies !
Join Or Combine Two Tables Based On Unique Column
I use MySQL query browser and have made two tables in one database:

First table: Test
Column names: Filename (Varchar(255)),RowNumber(Integer),Bestandsnaam (Varchar(255)), Pad (Varchar(255)), Grootte (Varchar(255)), Created (Varchar(255)), Modified (Varchar(255)), Accessed (Varchar(255)), Deleted (Varchar(255))

Second table: Hashtest
Column names: Filename (Varchar(255)), RowNumber (Integer), MD5 (Varchar(255)), SHA1 (Varchar(255)), Pad (Varchar(255))

Of both tables the column RowNumber is the primary key. Also, in both tables the column Pad is the same (the same content, not exactly in the same order)

Now, I want to combine the two tables into one table, based on 'Pad'

I suppose I have to use the Script function of MySQL query browser. Please explain to me what I have to do to combine the two tables into one table. This third table has this columns:

Filename (Varchar(255)),RowNumber(Integer),Bestandsnaam (Varchar(255)), Pad (Varchar(255)), Grootte (Varchar(255)), Created (Varchar(255)), Modified (Varchar(255)), Accessed (Varchar(255)), Deleted (Varchar(255)), MD5 (Varchar(255)), SHA1 (Varchar(255))

View Replies !
Work Out Daily Interest Rate Based On 2 Tables
Hi

I have the following DB structure

charges
cID [bigint]
cpID [bigint]
amount [decimal 3,2]
date_charge [datetime]

petitions
pID[bigint]
interestrate [decimal 3,2]
date_claim [datetime]
And need to do the following calculation:

($amount * ($date_claim - $date_charge) * ($interestrate / 36500))
The ($date_claim - $date_charge) section needs to work out the difference in days

Is something like that possible?

View Replies !
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




View Replies !
What Are Connections And How To Manage Them
I have been using mySQL for several years now, but I currently developing a larger/broader usage website with intense mySQL contents usage.

I have been told that mySQL has a so-called connection limit of 50-70.

QUESTIONS:

1) What is a connection limit? Or... How do you count 1 connection?

2) How do you properly manage this, to e.g. handle a site that has 1000 simultaneous users logged in to a web site and interacting with the database.

View Replies !
Manage Sql Queries
i've been using ms sql for many development and one of the many ways to manage sql queries would be to stored them as stored procedures. since mysql does nothave this feature in its stable release, does anyone have any good ways or good practices to stored sql quaries to allow easy maintenance? i plan to stored it as class files and call the function which returns the mysql quaries.

View Replies !
Install And Manage MySQL
I will have to follow-up my company mySQL server. I want to understand more about mySQL,
I would like to know if mySQL server can be installed through internet/web like myphpadmin? Or it must be installed locally?

View Replies !
Manage MySQL Instances
I am using the version 4.1.12a
Windows XP

In one customer I found the same version as mine and the ini file has

[mysqld]

port=3306

server-id = 1

basedir="C:/MySQL/"

datadir="C:/MySQL/Data/"

and the service is mysqld-nt

the question

I want to have the same service (mysqld-nt)
But different directory of my data

datadir="C:/MyData/Data/"

How can I do it in the configuration file??

View Replies !
Disappearing Tables In Windows 98
I think I have experienced this with 3 different computers. I'm not
sure, but I think all of them were using Windows 98 and MySQL version 3.x.

The problem is that some of the tables disappear from the database,
usually the tables that have most of data have disappeared so I think it
might be a bug in Windows 98 file handling.

Has anyone else experienced this or similar things?

View Replies !
PhpMyAdmin :: Manage Remote Databases?
Can phpMyAdmin be used to manage databases that are not local?

View Replies !
New Timezone Tables For Windows Build?
I'm trying to setup MySQL so I can use the "CONVERT_TZ" function.

To do this I need the timezone tables installed, but as I'm running on a Windows server, my only option is the pre-generated tables, which are now out of date.

In particular, they have incorrect daylight savings data for my local region: Australian Eastern Standard Time.

There is no way to generate them with the MySQL windows install, so I am wondering if anyone has any exported copy of the latest tables.(sorry, this should probably have been in the Install Forum)

View Replies !
MAXDB Not Allow To Create More Than 5 Instance On Database Manage
I have several problems with my MAXDB, I´m New user. The problem appears when I try to create more than 5 instance on DATABASE MANAGER, it close all conections and shut down all database, i have install it on LINUX DEBIAN 1.3 with MAXDB 7.5.

In addition to this, when I send more than 500 Mb. of data to my server it closes all connetions..

View Replies !
ORDER Based On One Field But LIMIT Based On Another?
Say I have a table with students and their grades, and I want to get the students with the top 10 grades, but the result to be sorted based on their name. How would I do that?

View Replies !
Creating Tables On Laptop Windows XP Home
I am an undergraduate student, and just installed MySQL 5.0 on my laptop running Windows XP Home. Now I am new to MySQL, and I need it for a class project for J2EE... Now can anyone please let me know that what needs to be done after I have extracted the MySQL files on C:, what is the next step I need to do, so that I can start creating tables

View Replies !
Sharing Database Tables Between Windows & Linux
I'm new to MySQL (using v4.1) and have a dual boot machine with Windows and Debian Linux (Etch).

My goal is to share a table named "wordpress" between Linux and Windows by storing it on a FAT32 mount (I realise this limits me to 4GB in total).

From what I can see at the moment, the "wordpress" tables live under /var/lib/mysql/wordpress.

Numerous searches have revealed how to backup data, but I haven't seen any clues on how to permanently reloate a database to another location.

View Replies !
Database Design: How Best To Manage Data Across Multiple Schemas / Databases
Our organization is looking for the best design for managing shared data. Specifically we wish to have a master table for data related to a Person. That person table would be shared by any other databases within the company that needed it. Of course, we do not want to share the whole master table, just the rows relevant to specific application that will be using it.

We also want the sharing to be as transparent as possible to both the users and the support / development staff. Using a view seems like the way to go, BUT...each application has tables with FKs to the Person table. We can't do FKs to a view. We can have the application reference the view for selects / updates to the Person table, and have the other tables define their FKs to the master Person table, but we're a little worried about security since we can't narrow their permissions to only certain columns & rows like in the view. Oh, I am not doing a good job of explaining this.

View Replies !
Windows 2003 To Windows XP Pro Secure Communications...
I have a Windows 2003 Server running a Coldfusion app that needs to constantly update a MySQL database on a Windows XP Pro machine.

These machines are not on a LAN and are physically separate. I'm trying to find a way to establish secure communications between them since I do not want port 3306 open to the entire internet.

What I've Tried
So far I tried CopSSH with Putty but this did not work because I need to manually initiate all sessions and enter passwords by hand.

Since there aren't any SSH solutions that allow persistent, automatic connections, it appears I need to go with VPN.

The VPN Dilemma
I tried creating a VPN server on the WinXP MySQL machine but I cannot get ODBC to work remotely. How do you get the ODBC on the local (Win 2003) machine to recognize the MySQL database on the remote (WinXP Pro) server?

Note: I also understand that getting SSL working on Windows is a pain in the butt. I'm trying to steer completely clear of that. I don't have the tools to recompile, etc.

View Replies !
Step By Step Approach To Manage Dual-master Set Up
I am thinking of having a dual master setup where two database servers
A and B are slaves to each other.

Could someone please point me to some documentation that details what
exactly I should do if A or B goes down?

View Replies !
How Do You Manage Changes From Development Server To Production Server?
What started out as a simple test of mysql has turned into what is
quickly becoming a replacement for our entire business system and web
site

The bad news is that we are now wrestling with how to we continue
working on development the system without risking down time for users.
If we work on a development server, how can we log the changes to table
structure and then apply them to the live database on the production
server when we are done testing?

Is there some sort of tool or log that would just let us apply table
structure changes to another copy of the database?

View Replies !
Select Based On FK
I have two questions regarding the MySQL v4.1.16 scenario below:

1. What should the FK on update and on delete parameters be (i.e., default, cascade, restrict, no action, etc.)?

2. How can I insert the correct id’s as implied below?

I have tried just about everything (including “Insert …select”, “LAST_UPDATE_ID();”, etc.) and whenever I think I am starting to get close I either get more errors or ‘0 records added’ with no error message;

I would greatlyappreciate someone who could instruct me on how to accomplish this task.

View Replies !
Using A Web Based Database
My web site host allows me to create MySQL databases on its database server. I've created a database as a trial. Now I would want users of my website to supply data to the database and for me to be able to extract it for analysis.

View Replies !
Web-based Chat
I'm debating between 2 different table setups for a web-based chat system (gchat clone). The first is just one table labeled 'chat' which has the columns 'user_1' 'user_2' 'time' 'message'. The second would be dynamically creating/deleting tables with the user names as table names like 'user_1/user_2'. I don't know a whole lot about DB table organization but I was thinking the actual 'select' statement would be faster with seperate tables. Any ideas?

View Replies !
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.

View Replies !
Union Based Upon First Query
I have a query that I would like to use a union statement in to grab the number of replies to a specific thread. The initial topic thread is in a different table, which I am grabbing in the initial query... I would prefer to do this in the single query, however I supposed I could do a separate loops and grab the number of replies with a totally distinct query ....

View Replies !
Syntax Based On MS Access SQL
Our shop is using an old version of MySQL (3.23).In testing our database concept we put together a test database in Access and the sql statement in MS Access looks like

SELECT DISTINCT FROM table1.col1, table2,col1
FROM table1, table2
WHERE (((table1,col1) like "*" & table2!col2 & "*"));

this gives us output from both tables(tables1 and tables2) while looping over the values of table2.col2.How does MySQL do this type of function?

View Replies !
Items Based On The First Letter
we have products database with CD's, and would like to create an alphabetical list of artists, then display the CD's that the artist has underneath them.
The database has the products in them, with the artists name being called 'prod_artist_name'. the query i tried, though I knew it wouldn't work is:

SELECT *
FROM products
WHERE prod_artist_name LIKE '%n%'

Now, this displays all the artists with the letter 'n' in their name, obviously. just wondering if there was a way to display the artists with 'n' as the first letter of their name.

View Replies !
Rows Based On First Letter
I'm trying to figure out the fastest/best way to return rows based on the first letter of the title column in my table. For example, I want to get all the article titles that start with the letter "a".
Is there any difference between the two select statements? Any reason to use one over the other? Memory? Speed?

SELECT title FROM table WHERE LEFT(title, 1) ='a';
or
SELECT title FROM table WHERE title like 'a%';

View Replies !
Sql Vs Text-based Databases
currently my site is storing data in text files, using explode() and seems pretty fast to me. would mysql be faster? i have a second box where i could set it up.

View Replies !
Update One Col From Another Col Based On Primary Key
I have a table which stores referral URLs in column 'ref' and primary key of the table is 'clid' I have added another column which will store the name of the search engine referral by the name 'SearchEngine'. Now what I want to do is to avoid PHP processing and write a mysql query as follow,

Code:

UPDATE clicks
SET SearchEngine=(
SELECT (
CASE WHEN (LOCATE('.google.',ref)!=0) THEN 'Google'
WHEN (LOCATE('.yahoo.',ref)!=0) THEN 'Yahoo'
WHEN (LOCATE('.msn.',ref)!=0) THEN 'Microsoft'
WHEN (LOCATE('.microsoft.',ref)!=0) THEN 'Microsoft')
WHEN (LOCATE('.live.',ref)!=0) THEN 'Microsoft')
ELSE 'Others' END
),
@tmpo:=clid
FROM clicks WHERE ref!=''
)
WHERE (clid=@tmpo);

but it gives me following error,

Code:

ERROR 1064 (42000): 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 ') WHEN (LOCATE('.live.',ref)!=0) THEN 'Microsoft') ELSE 'Others' END),clid:=@tm' at line 1

Basically i want to parse referral url, decide the search engine name and then store its name in the new column based on primary key so that correct values are stored in correct record.

View Replies !
Date Based Calculations
I'm looking for a way to create a query that generates a record for every day of the last year and using that date information for each day generates a unique database query (sub query?)for each day of the year.
I could probably do this in php but I'd like to do it for performance reasons from mysql (or at least most of it).
Does any one know of any good online tutorial/s that may help me build this sort of project? Or have some basic scripts that may be a good starting point?

View Replies !
Update Based On Another Table
Is it possible to do an update in MYSQL based on another table? I have version 3.23 and when I try to run this statement:


UPDATE ApplicationTbl
INNER JOIN AcademicTbl
ON ApplicationTbl.CampusID = AcademicTbl.CampusID
AND ApplicationTbl.Application_Period = AcademicTbl.Application_Period
SET ApplicationTbl.App_Status = 'Qualified'
WHERE AcademicTbl.Sem_OnCampus >= '1'
AND AcademicTbl.GPA >= '2.4'
AND AcademicTbl.Judicial_Sanction IS NULL

It keeps saying its wrong. Even though I know its not

View Replies !
Update One Column Based On Another
I have two tables. One set up like this:

id item_id group_id userid outcome settled

The second is

userid yes no

I would like to look at the first table and find all rows that have a specific group_id, then update the userid yes/no based on the outcome on that row. Outcome Y then add 1 to the yes column of that userid, outcome N then add 1 to the no column of the userid. Is this possible in one SQL statement?

View Replies !
I Need To Be Able To Get A Result Based On 2 Different Queries
I have a query that dislpays a pick up route. It shows a list of clients that needs to be serviced on any given day. Than I have a different query that displays all the clients that have been serviced on that particular day.

Now I need to show the clients that did not get the service that day.

View Replies !
Sql Based Contact Form
how would I create a contact form that would store the results in a sql databse, be able to see the results in a text file, and also would have a link to delete that result from the database in the results text file?

View Replies !
Timestamp Based Queries
I would just like some links or advice to information on how to do a query based on a timestamp.

Ie, I would like to find all the records in a movie database where was made after the year 2002.

View Replies !
Increment Based On Another Column
I'm having a little trouble working out the best way of doing something.

I'm storing a key split across two fields, the first field is 3 letters, the second is three numbers:
CREATE TABLE table1 (
id_a CHAR(3) NOT NULL,
id_b SMALLINT(3) NOT NULL,
...
);
What I'd like to do is have it so that when a new row is entered 'id_b' is calculated as MAX(id_b) + 1 WHERE id_a = new_id_a.

Is it safe to do this as some sort of nested query or is there a better way?

View Replies !
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.

View Replies !
Web Based MySQL Editor
I am looking for a Web Based MySQL Editor to manage, database, users, etc and if you can, tell me why you like it, good points, bad points, etc. I use PHPMyAdmin right now, so I am looking for something possibly better.

View Replies !
Retreaving Data Based
I have tables called room_status and room_info

room_status= room_id : date : status

room_info= room_id : type : rate

What I want to do is only make an entry in room_status when
a room is booked, as it is obviously available otherwise(duh) but
I don't know how to format a SELECT statement to bring back
rooms available on a specific date by only returning results from
the room_information table which do not have an entry in the room_status
table for a specific date, which is the case if I don't formally record that
a room is available.

View Replies !
Selecting Another Column Based On Max()
I've got a funky query I'm trying to set up. I've got this poll answers database, and each row has a qid that matches to a question. So I can group answers by the question they correspond to. Now I'm trying to select the total votes and the answer with the most votes for each question. The total votes part is working fine, but I'm having trouble with the winning answer part.

I've got a MAX(votes) that works well, and finds the answer with the most votes for every question, and returns its votes. What I want to do is select the `answer` column (the one that houses the actual text answer) of the answer with the greatest votes (the winner). Code:

View Replies !
SQL Selection Based On Date
I'm using this function / string to pull data based on yesterday:

$tomorrow = date('Y-m-d',strtotime('tomorrow'));

How can I pull data similarily based on "last month"?


View Replies !
Deleting Based On Subquery
i need to DELETE the results of this query :

SELECT bizName, COUNT( bizName ) AS name_count
FROM `datanewest` GROUP BY bizName
HAVING name_count >1
I use this to remove double entries. But when i run something lie this

DELETE FROM `datanewest` WHERE bizName IN (SELECT bizName, COUNT( bizName ) AS name_count
FROM `datanewest` GROUP BY bizName
HAVING name_count >1)
i get this error :

#1241 - Operand should contain 1 column(s)

View Replies !
Sql Statement Based On The Result Of Another?
I would like to use the result of one sql statement in another condition...

$select="select descr from ne_cats where " select sub_cat_id from ne_cats_rel, ne_cats where ne_cats_rel.cat_id='$cat_id'" "; .....

View Replies !
Ordering Based On Occurence?
I have this part of my query
SELECT DISTINCT country
FROM traffic_outgoing

and I want to limit it to the top 10 countries that have the highest number of occurences. How would I do that?

View Replies !
Selecting From One Table Based On Another?
I have a table for products

and another table for the type of product it is like this:

I need this is be in a seperate table because one product can be several different types like ring,band,wedding,three-stone,etc.

but how can I then select a product based on criteria from the types table

say I wanted to select all products that are type = "Band" and type != "Fancy" ?

View Replies !

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