Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rewrite of a Old MYSql Statement

Status
Not open for further replies.

eipluk

Technical User
Apr 14, 2015
1
0
0
US
Hello

I have a MYSQL select statement which works fine with MySql 5.0, however isn't compatible with the latest version of Mysql - 5.6

Is it possible to rewrite to remove the "*" which I believe to be the problem

Any suggestions / assistance would be apprciated

SELECT `crmnow_pdf_fields`.pdffieldname AS name, `crmnow_pdfcolums_sel`.pdftaxmode AS taxmode, `crmnow_pdfcolums_sel` . * AS selected, `crmnow_pdfcolums_active`.position AS active, crmnow_pdf_fields.quotes_g_enabled AS group_enabled, crmnow_pdf_fields.quotes_i_enabled AS individual_enabled
FROM `crmnow_pdfcolums_sel`
INNER JOIN crmnow_pdfcolums_active ON ( crmnow_pdfcolums_active.pdfmodulname = `crmnow_pdfcolums_sel`.pdfmodul )
INNER JOIN crmnow_pdf_fields ON crmnow_pdfcolums_active.pdftaxmode = `crmnow_pdfcolums_sel`.pdftaxmode
WHERE pdfmodul = 'Quotes'
AND `crmnow_pdf_fields`.pdffieldname = 'Position'

Thank You
 
there is an error. it's not a version thing.

this line
Code:
`crmnow_pdfcolums_sel` . * AS selected

first there is a space either side of the dot. i don't recall whether mysql is agnostic to spaces.

but mostly you can't select an entire table (*) as a single field.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top