Jump to content

Recommended Posts

i made a table where catID and catName name is given and inserted different data when i want to show data and made query like this: "select CatName from table_name where CatID=category_id order by CatName ASC" than result shows like this:

 

|  NewMan                                          |

|  NewVision                                        |

|  Sherpa High Ambitions                        |

| Abound Asian                                    |

| Above The Clouds                              |

| Ace The Himalaya                              |

| Acme Show                                      |

 

how i can fix this problem?

Link to comment
https://forums.phpfreaks.com/topic/128810-blank-space-problem/
Share on other sites

There appear to be spaces at the start of the first 3 lines. You should always validate your data before inputting it into a database and if you don't want any spaces at the beginning or end of a string, you need to use the php trim() function on it before placing it into a query.

Link to comment
https://forums.phpfreaks.com/topic/128810-blank-space-problem/#findComment-667953
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.