Jump to content

Recommended Posts

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

[code]

<?
$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>";
        }
?>
[/code]

Thanks in advance

Seamless
Link to comment
https://forums.phpfreaks.com/topic/5913-case-sensivity/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.