Welcome Guest, Not a member yet? Register   Sign In
Removing single quotes for display in views
#1

[eluser]Unknown[/eluser]
Hi, there,

I am sure this question gets asked all the time. I have done many searches for it, but I can't quite find what the standard solution is for it.

So ActiveRecord espaces data with single quotes. That is fine with me, and I want that.

The problem is that when I display the record, the single quotes come along for the ride. I need to get rid of the single quotes.

I can write something to do this, but since this is such a basic task, I rather go with what most of the CI community uses for it.

So what is the standard way within the CI community to strip the single quotes?

Thanks in advance.
#2

[eluser]TheFuzzy0ne[/eluser]
I don't think what you're describing has anything to do with the Active Record library, which would explain why you are having difficulty finding the answer through via a search engine. The Active Record library uses backticks to escape field names, not single quotes.

When you pull any results from the database, the values are strings. They should not contain any quotes, unless you added them to the value before saving it to the database.

It would help to see how you are saving data to, and pulling data from your database, as well as your view.




Theme © iAndrew 2016 - Forum software by © MyBB