how to make database item unique


Posted on 16th Feb 2014 07:03 pm by admin

Hey guys,

is it possible to do this:

Did you know?Explore Trending and Topic pages for more stories like this.
I have the database item $title being pulled for the title and the actual clickable part of a link.

Is it possible to make the $title in the link title unique?

I ask because i'm truncating the clickable text with this code:

Code: $maxChars = 28;
if(strlen($row['album']) > $maxChars) {
$row['album'] = substr($row['album'], 0, $maxChars - 3);
$row['album'] .= "...";
}
and the link title shows the truncated version to. If i could make the clickable link or the title $title unique then i could have the full db item for the title and still have it truncated for the clickable text.

Anyone know if this is possible?
No comments posted yet

Your Answer:

Login to answer
283 Like 26 Dislike
Previous forums Next forums
Other forums

PHP loop
Okay so I have several "articles" stored in a mysql database and am attempting to echo tho

Undefined variable when using $_SERVER['PHP_SELF']
Hi guyz, please suggest me something...
On first.php I have one input field NAME, and on posting

Remove directories not empty
hi,
i have an array that contains some names (1,4,6,56...). Every integer is a name of a folder.<

How could I combine these arrays??
Hello.. I'm trying to figure out a way to combine these first two arrays to get the last array..

Using system() and bringing back the results
I am aware that you can use system() within PHP to execute system commands, but I was wondering if t

natcasesort works on one server but not on another
Hi

I have a problem that I was hoping that someone can help me with.

I'm trying to use

Why is this query failing?
Why is this not working?
$query = "SELECT * FROM `users` WHERE `userid` = " . $USERID

what business processes?
Hi,

A general question. What business processes (like OTC - Order to Cach, P2P, R2R etc)

Auto-populating dropdowns and multiple forms.
Here's what I have so far:

First drop down = select a state (works)
This populates the sec

Simple MySQL query...
Hello,
How could I do a mysql query that does this: SELECT * WHERE date/time < 5minutes ag

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash