how to make database item unique


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

Hey guys,

is it possible to do 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

Using two $_POST Function / Switch () statements, second does not work.
Hi all. I’m new to php and am having a problem getting $_POST Function / switch () to work. I

TCP Sending Unsigned Char...
Hi...

I want to send over tcp/ip some data, i have the data in hexadecimal, and when i tr

get the country of visitor and display content based on that
Hello all,

I have seen that Google analytics can tell you where a visitor is coming from and

How to show a complete textarea ??
I enter Client Case Notes notes in a textarea field on a PHP form. The field is 5 rows deep and 70 c

Why use interfaces in PHP (OOP)
I am learning OOP in PHP and its been a pretty good learning experience so far. What I didn't unders

Check something, wait, check again, do something!
Hi guys.

I wonder if someone can help me with this.

Basically, what I want to do is (

Putting double spaces instead of single spaces
Im looking at trying to replace all single spacing between fields with double spacing

At pres

Help with Password Encoding/Decoding?
Trying to design a "change password" tool. On my signup code I'm using base64_encode, now

How do I use a global footer..?
If my index.php has a bole bunch of if functions and exit's in them

Help? Need help on project with templates involving mysql and php.
I'm having a hard time explaining what I want but basically here is what I have in place:

-Da

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