Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Old 07-01-2009, 06:28 AM   #1 (permalink)
Member
 
Join Date: 12-19-08
Posts: 37
iTrader: 0 / 0%
Latest Blog:
None

RyOn is liked by many
Question Mysql query browser drop list

ok i have 2 tables in my database, table 1 and table 2.

In table 1 i have a column that in each row has a different word

Now in table 2 i want to be able to have a column where by when i go to enter data i am given the option of selecting words from a drop down menu, this list is is retrieving its data from the column data from table 1.

remember my question is about how to do this in mysql query browser.

i have done this in ms access but do not know how in mysql query browser.
RyOn is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-01-2009, 02:18 PM   #2 (permalink)
Meeow!
 
Costin Trifan's Avatar
 
Join Date: 04-13-07
Location: Romania
Posts: 3,235
iTrader: 0 / 0%
Latest Blog:
None

Costin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest order
I'm not sure you can do that in mysql...I could be wrong though...I'm no db expert.
__________________
...to be continued
Costin Trifan is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-01-2009, 03:27 PM   #3 (permalink)
Member
 
Join Date: 12-19-08
Posts: 37
iTrader: 0 / 0%
Latest Blog:
None

RyOn is liked by many
Quote:
Originally Posted by Costin Trifan View Post
I'm not sure you can do that in mysql...I could be wrong though...I'm no db expert.
what do you think the best way is to get this done?
Create a form in php? (which i havnt done before )
RyOn is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-01-2009, 05:09 PM   #4 (permalink)
Contributing Member
 
Join Date: 06-25-09
Location: Brighton, UK
Posts: 113
iTrader: 0 / 0%
kieransimkin is liked by somebodykieransimkin is liked by somebodykieransimkin is liked by somebody
It's actually fairly easy to do in PHP, start with something like this and see how you do.
__________________
~Kieran Simkin
Software Developer, Photographer, Musician

Portfolio: The changing landscape of Cuckmere Haven
Business: Affordable web hosting from Digital Crocus
kieransimkin is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-02-2009, 02:34 AM   #5 (permalink)
Meeow!
 
Costin Trifan's Avatar
 
Join Date: 04-13-07
Location: Romania
Posts: 3,235
iTrader: 0 / 0%
Latest Blog:
None

Costin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest order
Quote:
Originally Posted by RyOn View Post
ok i have 2 tables in my database, table 1 and table 2.

In table 1 i have a column that in each row has a different word

Now in table 2 i want to be able to have a column where by when i go to enter data i am given the option of selecting words from a drop down menu, this list is is retrieving its data from the column data from table 1.

remember my question is about how to do this in mysql query browser.

i have done this in ms access but do not know how in mysql query browser.
Maybe I didn't understand you correctly, but you want to display the content of one table into another table's column as a dropdown list in your mysql client, like PhpMyAdmin or SQLYog and not in a php page, right? (please clarify)

because my answer was related to the first part and not the second like kieransimkin pointed out.
__________________
...to be continued
Costin Trifan is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-02-2009, 06:35 AM   #6 (permalink)
Member
 
Join Date: 12-19-08
Posts: 37
iTrader: 0 / 0%
Latest Blog:
None

RyOn is liked by many
Quote:
Originally Posted by Costin Trifan View Post
Maybe I didn't understand you correctly, but you want to display the content of one table into another table's column as a dropdown list in your mysql client, like PhpMyAdmin or SQLYog and not in a php page, right? (please clarify)

because my answer was related to the first part and not the second like kieransimkin pointed out.
Yeah original question was just to see if i could create a droplist in mysql query browser, but if you don't think that is possible then how could i manipulate the data in the column the same way, php?

so yea you did answer my 1st question costin

and thanks kieransimkin, im looking into the tut on the link.
RyOn is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-02-2009, 07:31 AM   #7 (permalink)
Moderator
 
Hades's Avatar
 
Join Date: 01-23-07
Location: Buenos Aires, Argentina
Posts: 1,254
iTrader: 0 / 0%
Hades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest order
MySQL (as any DB engine) was designed to interact with applications.

Query Browser, however it's a utility, and its purpose is to help you maintaining and doing administration stuff on the database. You don't do data entry from Query Browser, for that purpose you should either:

1-download an application that allows you to connect to MySQL and do data entry.
2-or develop an application that allows you to connect to MySQL and do data entry.

I don't think there are any free data entry software that you can download, but certainly it's very easy to develop in PHP following some tutorials.

-Mysql/php basics
-Using forms and databases
-Dynamic dropdown lists.
__________________
Hades,
Ancient god, King of the Nether World, and Guardian of the Dead.
...and on my free time I'm also a web developer, contact me if you need one!
Hades is online now  
Add Post to del.icio.us
Reply With Quote
Old 07-08-2009, 05:07 AM   #8 (permalink)
Member
 
Join Date: 12-19-08
Posts: 37
iTrader: 0 / 0%
Latest Blog:
None

RyOn is liked by many
How do I create a database driven drop down form in php?

What would the code be?

I have been searching all over for a good code.
And have tried looking through all the tuts like in w3schools.
But i just cant seem to hack this one.

Would someone be able to give me a quick fix and post an example php code?

Regards
Ryan
RyOn is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-08-2009, 07:31 AM   #9 (permalink)
v7n Mentor
 
Izzmo's Avatar
 
Join Date: 11-01-03
Location: Kansas City
Posts: 1,338
iTrader: 0 / 0%
Latest Blog:
Starting p90x today

Izzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web pro
Send a message via ICQ to Izzmo Send a message via AIM to Izzmo Send a message via MSN to Izzmo Send a message via Yahoo to Izzmo
This is common in Microsoft products and can be done in MSSQL, phpMyAdmin/MySQL it cannot though.

I have never used Query Browser, but it might do what you are looking for, as Hades said.

Your other option, as others have said, is to create a PHP application, which is very easy to do in this case.

--

To create a PHP app for something like this, you would need to create a connection to your database, get the data from the database (the words table), use that data to populate a select dropdown list, and then add another input for what you need to insert into the other table. From there, once the submit button is clicked, you would validate your data and then add it into the database.

Bam! You're done.
__________________
Izzmo
Coding Guru Extraordinaire
ZeroWeb Hosting & Design - Customizable hosting for every type of user!
Izzmo is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Drop Shadow Query jdspc Digital Photography Forum 1 04-25-2008 10:04 PM
Which one faster mysql query? smith Coding Forum 7 03-29-2007 05:41 AM
mysql query problem (php) songwritingfever Coding Forum 3 05-03-2006 01:39 PM
Mysql Query & HTTP_POST_VARS onlinegamenet Coding Forum 4 03-01-2005 10:19 AM
mysql / php search query robpicken Coding Forum 0 07-28-2004 05:26 AM


Sponsor Links
Get exposure! Contextual Links V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 10:59 PM.
© Copyright 2008 V7 Inc
Powered by vBulletin
Copyright © 2000-2009 Jelsoft Enterprises Limited.


Search Engine Optimization by vBSEO 3.3.0 ©2009, Crawlability, Inc.