mySQL query

Status
Not open for further replies.
C

chrismitchell

Guest
Hi everyone.. I need a mySQL query to call 2 columns from 2 different tables in a database.

Can anyone help me?

my available variables are: %WHERE%, %HAVING%, %ORDERBY% and %LIMIT%

any help would be great :)
 
this is what I have so far:

Code:
 SELECT ID,value FROM wp_wpsc_submited_form_data WHERE value='*'SELECT ID,name FROM wp_wpsc_variation_values WHERE name='*'

I just need to know how to make the SQL call those 2 columns to make the export work.

Any help?
 
I now have a bit more if anyone can help me.. I need to combine an entire row to make it display the whole name and address of the customer.. but all the information is in a row called value. I can get it to display each bit of information but it doesn't group the information from the value column. Here is the mySQL that I have:

SELECT value,name FROM wp_wpsc_submited_form_data
JOIN wp_wpsc_variation_values

value is from the form_data table and name is from the variation_values table. The variation_values table is fine, its just the form_data table that I need the value column to be combined.

I've tried the GROUP_CONCAT command, but it doesn't work..

Anyone else have any ideas?
 
Do you have any common field between both tables?
If yes, then only you can apply 'join' to them and get the result.
 
unfortunately the JOIN function doesn't work in this instance. Which is a bit rubbish, but never mind :)
 
Its ok George, it all worked out in the end.. I hand coded a plugin to do the job for me LOL

Thanks anway :)
 
Status
Not open for further replies.
Back
Top