Any PHP/MySQL Guys Up?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bama
    Confirmed User
    • Nov 2001
    • 2727

    #1

    Any PHP/MySQL Guys Up?

    I usually have my guy do this stuff but he's on vaca and I'd like to get this done so I can move forward so if anyone that knows php/sql, do me a favor and take a quick peek for me...

    This calls the output for an events script I'm using and I'd like to be able to truncate the title ($result) to 10 characters (some titles are way too long for the section this output is echo'd)

    Thanks in advance!

    http://www.bamas.com/code.txt
  • darksoul
    Confirmed User
    • Apr 2002
    • 4997

    #2
    find
    Code:
    while($row = mysql_fetch_row($result)){
    and add
    Code:
     $row[1] = substr($row[1],0,10);
    so your code will look like:
    Code:
    while($row = mysql_fetch_row($result)){
    $row[1] = substr($row[1],0,10);
    .
    .
    .
    1337 5y54|)m1n: 157717888
    BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
    Cambooth

    Comment

    • Bama
      Confirmed User
      • Nov 2001
      • 2727

      #3
      Thank you Dark Soul - that worked like a charm!

      Comment

      Working...