Ninjakreborn Posted February 9, 2011 Share Posted February 9, 2011 Is there any way to use ONE alias, along with the standard wildcard. In theory I would think 'products.product_id_number AS product_id, *' That should get the product_id as product_id_number as product_id, then get the rest of them like normal. Is there any way/syntax to perform this action? Link to comment https://forums.phpfreaks.com/topic/227188-use-wild-card-with-alias/ Share on other sites More sharing options...
requinix Posted February 9, 2011 Share Posted February 9, 2011 SELECT products.product_id_number AS product_id, * FROM products... So yeah, you got it right. Link to comment https://forums.phpfreaks.com/topic/227188-use-wild-card-with-alias/#findComment-1171978 Share on other sites More sharing options...
Ninjakreborn Posted February 10, 2011 Author Share Posted February 10, 2011 No, that was an example of what I tried. That throws a syntax error. Link to comment https://forums.phpfreaks.com/topic/227188-use-wild-card-with-alias/#findComment-1172170 Share on other sites More sharing options...
Maq Posted February 10, 2011 Share Posted February 10, 2011 No, that was an example of what I tried. That throws a syntax error. What's the error? Link to comment https://forums.phpfreaks.com/topic/227188-use-wild-card-with-alias/#findComment-1172174 Share on other sites More sharing options...
ale8oneboy Posted February 10, 2011 Share Posted February 10, 2011 In my experience I've had to use the alias on the wild card too. Try: SELECT products.product_id_number AS product_id, products.* FROM products Link to comment https://forums.phpfreaks.com/topic/227188-use-wild-card-with-alias/#findComment-1172252 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.