INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Rewrite of a Old MYSql Statement

Rewrite of a Old MYSql Statement

(OP)
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

RE: Rewrite of a Old MYSql Statement

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close