Jump to content

SELECT AS 2 things?


jimmyoneshot

Recommended Posts

Quick question. I need to select the same thing as 2 things and I'm wondering if there is a shorthand to basically do this:-

 


SELECT

photos.id AS photoId AND itemId,
photos.name,
photos.author_id

FROM photos

 

OR is there no shorthand for this and will it need to be done as:-

 


SELECT

photos.id AS photoId,
photos.id AS itemId,
photos.name,
photos.author_id

FROM photos

Link to comment
https://forums.phpfreaks.com/topic/249636-select-as-2-things/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.