Jump to content

Recommended Posts

hey,

I want to remove the `index` column from the `storeinfo` table in the results of a mysql query

 

any one know the prober syntax???

here is the code on the bottom?

 

SELECT `emails`.`New orders` , `settings`.`site_folder` , `storeinfo` . * FROM `emails` , `settings` ,`storeinfo`

 

thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/163690-solved-exclude-row/
Share on other sites

`storeinfo` . *

 

* means it will select ALL...

 

if you don't want index it it.. then don't use the *.

 

instead do like..

 

`storeinfo` . something, `storeinfo` . something2, `storeinfo` . something3..

 

but you see doing it your way just to get rid of index.. is soo much longer.. and worse

Link to comment
https://forums.phpfreaks.com/topic/163690-solved-exclude-row/#findComment-863751
Share on other sites

its not that big a deal, i will just live having the index in there.

 

 

thanks a lot

 

It is bad practice to use SELECT * unless you need all of the fields. Using * instead of listing just the required columns is not only inefficient, it also impacts the reliability and maintainability of your code.

 

Just list the columns you want, it's not difficult.

Link to comment
https://forums.phpfreaks.com/topic/163690-solved-exclude-row/#findComment-863757
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.