Jump to content

BLANK SPACE problem


fantic

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

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.