close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

MySQL vs MSSQL - having real problems with INNER JOIN

Thread began 1/08/2014 12:07 pm by Nathon Jones Web Design | Last modified 1/09/2014 2:47 pm by Nathon Jones Web Design | 1401 views | 8 replies

Nathon Jones Web Design

MySQL vs MSSQL - having real problems with INNER JOIN

Jings, this is going to be tougher than I thought. I'm so used to MSSQL. :(

What is the issue with running an INNER JOIN select statement?
Here's what it used to look like in MSSQL:

SELECT dbo.LEDprods.LEDid, dbo.LEDprods.LEDdelete, dbo.LEDprods.LEDproductcode, dbo.LEDprods.LEDcatID, dbo.LEDprods.LEDfittingID,
dbo.LEDprods.LEDstyleID, dbo.LEDprods.LEDwattageID, dbo.LEDprods.LEDcolourID, dbo.LEDprods.LEDdimmable, dbo.LEDprods.LEDfrostedclear,
dbo.LEDprods.LEDlumensID, dbo.LEDprods.LEDsensor, dbo.LEDprods.LEDprice, dbo.LEDprods.LEDimg, dbo.LEDprods.LEDchipsID,
dbo.LEDwattage.LEDwattage, dbo.LEDstyle.LEDstyle, dbo.LEDlumens.LEDlumens, dbo.LEDfitting.LEDfitting, dbo.LEDcolour.LEDcolour,
dbo.LEDchips.LEDchips, dbo.LEDcats.LEDcat
FROM dbo.LEDprods INNER JOIN
dbo.LEDcats ON dbo.LEDprods.LEDcatID = dbo.LEDcats.LEDcatID INNER JOIN
dbo.LEDchips ON dbo.LEDprods.LEDchipsID = dbo.LEDchips.LEDchipsID INNER JOIN
dbo.LEDcolour ON dbo.LEDprods.LEDcolourID = dbo.LEDcolour.LEDcolourID INNER JOIN
dbo.LEDfitting ON dbo.LEDprods.LEDfittingID = dbo.LEDfitting.LEDfittingID INNER JOIN
dbo.LEDlumens ON dbo.LEDprods.LEDlumensID = dbo.LEDlumens.LEDlumensID INNER JOIN
dbo.LEDstyle ON dbo.LEDprods.LEDstyleID = dbo.LEDstyle.LEDstyleID INNER JOIN
dbo.LEDwattage ON dbo.LEDprods.LEDwattageID = dbo.LEDwattage.LEDwattageID
WHERE (dbo.LEDprods.LEDdelete = 0)

Here's what I changed it to for MySQL:

SELECT LEDprods.LEDid, LEDprods.LEDdelete, LEDprods.LEDproductcode, LEDprods.LEDcatID, LEDprods.LEDfittingID,
LEDprods.LEDstyleID, LEDprods.LEDwattageID, LEDprods.LEDcolourID, LEDprods.LEDdimmable, LEDprods.LEDfrostedclear,
LEDprods.LEDlumensID, LEDprods.LEDsensor, LEDprods.LEDprice, LEDprods.LEDimg, LEDprods.LEDchipsID,
LEDwattage.LEDwattage, LEDstyle.LEDstyle, LEDlumens.LEDlumens, LEDfitting.LEDfitting, LEDcolour.LEDcolour,
LEDchips.LEDchips, LEDcats.LEDcat
FROM LEDprods INNER JOIN
LEDcats ON LEDprods.LEDcatID = LEDcats.LEDcatID INNER JOIN
LEDchips ON LEDprods.LEDchipsID = LEDchips.LEDchipsID INNER JOIN
LEDcolour ON LEDprods.LEDcolourID = LEDcolour.LEDcolourID INNER JOIN
LEDfitting ON LEDprods.LEDfittingID = LEDfitting.LEDfittingID INNER JOIN
LEDlumens ON LEDprods.LEDlumensID = LEDlumens.LEDlumensID INNER JOIN
LEDstyle ON LEDprods.LEDstyleID = LEDstyle.LEDstyleID INNER JOIN
LEDwattage ON LEDprods.LEDwattageID = LEDwattage.LEDwattageID
WHERE (LEDprods.LEDdelete = 0)

Now, before you point out that you can't have a field name called the same as the table name, I've changed that but it just doesn't work. No errors are reported, it's just that no table rows are shown.

Is there something obvious that I've missed here. Please bear with my btw. I really want to port everything to PHP/MySQL and it's going to take me some time to adjust.

With that in mind, can anyone point me in the direction of a good website or forum for these types of headaches, ie. one that helps peopel make this transition from Classic ASP and MSSQL to PHP and MySQL?

Much appreciated.
NJ

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...