Jump to content

[SOLVED] Quick PHP/ SQL question


Padgoi

Recommended Posts

I have an SQL query:

 

$q = "SELECT pid, topic_id, author_name, author_id from ibf_posts order by pid desc limit 1";

 

How can I limit the author name to say 10 characters?  I have a code that displays the author name but I only want it to show 10 characters.  Can I do this via the SELECT function?

Link to comment
https://forums.phpfreaks.com/topic/169980-solved-quick-php-sql-question/
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.