Jump to content


Photo

Case Sensivity


  • Please log in to reply
1 reply to this topic

#1 Seamless

Seamless
  • Members
  • PipPip
  • Member
  • 25 posts

Posted 27 March 2006 - 08:55 AM

I do apologise if this has been covered before...

I'm retrieving some results from a mysql database and i'm using mysql_fetch_array() everything works fine..

Apart from the results are not case sensitive, i've checked the database using phpMyAdmin and the values stored ARE case sensitive what am i doing wrong?

here's a peice of code as an example


<?
$sql = "SELECT * FROM table ORDER BY signup_date DESC LIMIT 5";
$result    = mysql_query($sql) or die ("ERROR: ".mysql_error()." with query: $sql");
    while($row = mysql_fetch_array($result)){
        echo "<tr>
                    <td class='profile_name'>
                        <p><a href='user-profile.php?username=$row[username]'>$row[username]</a></p>
                    </td>";
// Format date
                $signup_date = date('d-m-y', strtotime($row[signup_date]));
                echo "<td class='signup_date'>
                        <p>$signup_date</p>
                    </td>
                </tr>";
        }
?>

Thanks in advance

Seamless

#2 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,021 posts

Posted 27 March 2006 - 11:58 AM

I can't see anythig in your PHP or MySql code that would have any effect on case. What about your stylesheet definitions?
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users