MySQL Left join (I think) help -


I've been working out how the said table relational made trouble for the line to go back to the table I have been Two tables are shown below

the web_quote_models table

  id. | Model | Product_id | Cpu_id | RAM_ID | HDDID | Os_id | Opt_id ================================================= ======================== 1 | 000001 | 1 | 1 | 1 | 1 | 1 | 1 2 | 000002 | 1 | 2 | 2 | 2 | 2 | 2 3 | 000003 | 1 | 3 | 3 | 3 | 3 | 3 4 | Custom | 0 | 0 | 3 | 4 | 4 | 4   

web_quote_component_cpu table

  id | Name ================================================= ======================== 1 | Intel & amp; Reg; Core & amp; business; I3 2100 3.1GHz Dual Core 2 | Intel & amp; Reg; Core & amp; business; I5 2500 2.7GHz Quad-Core 3 | Intel & amp; Reg; Core% business; I7 2600 3.4GHz 8MB cache dual core   

So I need to find that he is a query that will appear within web_quote_models table and $ _SESSION [ 'models'] with model field Corresponds to Then match the web_quote_models.cpu_id field with web_quote_component.id.

It is so far from me; I can not overcome that far away from me.

  web_quote_component_cpu.id on web_quote_models leave web_quote_component_cpu web ( "web_quote_component_cpu.name = 'web_quote_models.cpu_id' and Web_quote_modelskname = '". $ _ SESSION [' ideal ']. "  

Donation.

Thank you in advance for helping anyone on a large scale.

Donation. < p>

I do not think that far. I'm going to stop quoting the confidence that you need to do web_quote_models. Cpu_id :

  web_quote_component_cpu Select from left web_quote_co mponent_cpu.name Join web_quote_models - attention deficit line quotes the following: on web_quote_component_cpu.id = web_quote_models.cpu_id and web_quote_models.name = ''. $ _ SESSION [ 'models']. ''   

edit

note, I personally would query rewrite: ". $ _ sESSION

  select web_quote_component_cpu web_quote_component_cpu.name Where ID (WEB_QUOTE_MODELS ou_quote_models.name = from id SELECT ['model']. ''); Although   

although I think the with and will be enough:

  Web_quote_component_cpu select web_quote_component_cpu name left_in_pot_models- lack of quotes in the following line: on web_quote_component_cpu.id = web_quote_models.cpu_id where web_quote_models.name = ''. $ _ Session ['model'] ''    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -