Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8141373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:29:08+00:00 2026-06-06T12:29:08+00:00

I want to develop a short url system, like bitly, and I have a

  • 0

I want to develop a short url system, like bitly, and I have a problem in the database. I can’t make the difference beetween a and A in the database.

This is what I have saved in the database:

1   aaaaaaa a   a   a   a   a   a   a   aaaaaaa 1340802562  
3   aaaaaab a   a   a   a   a   a   b   aaaaaab 1340802562  
5   aaaaaac a   a   a   a   a   a   c   aaaaaac 1340802562  
7   aaaaaad a   a   a   a   a   a   d   aaaaaad 1340802562

At id 2, I should have had aaaaaaB. This is the table structure properties:

1   id  bigint(20)      UNSIGNED    Nu  None    AUTO_INCREMENT    Schimbare   Aruncă     More 
     2  combination varchar(8)  utf8_general_ci     Nu  None          Schimbare   Aruncă     More 
     3  a   varchar(2)  utf32_general_ci        Nu  None          Schimbare   Aruncă     More 
     4  b   varchar(2)  utf8_general_ci     Nu  None          Schimbare   Aruncă     More 
     5  c   varchar(2)  utf8_general_ci     Nu  None          Schimbare   Aruncă     More 
     6  d   varchar(2)  utf8_general_ci     Nu  None          Schimbare   Aruncă     More 
     7  e   varchar(2)  utf8_general_ci     Nu  None          Schimbare   Aruncă     More 
     8  f   varchar(2)  utf8_general_ci     Nu  None          Schimbare   Aruncă     More 
     9  g   varchar(2)  utf32_general_ci        Nu  None          Schimbare   Aruncă     More 
     10 url varchar(255)    utf8_general_ci     Nu  None          Schimbare   Aruncă     More 
     11 time    int(10)         Nu  None          Schimbare   Aruncă     More 
     12 status  int(10)         Nu  None          Schimbare   Aruncă     More 

This is the code:

<?php
require_once('Controller.php');

class ShortLink extends Controller {
  public $chars="aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPq1Qr2Rs3St4Tu5Uv6Vw7Wx8Xy9Yz0Z";
  public function generate() {
    $this->DBconnect();
    echo $length = strlen($this->chars);
    for($a=0;$a<$length;$a++) {
      for($b=0;$b<$length;$b++) {
        for($c=0;$c<$length;$c++) {
          for($d=0;$d<$length;$d++) {
            for($e=0;$e<$length;$e++) {
              for($f=0;$f<$length;$f++) {
                for($g=0;$g<$length;$g++) {
                  $combination = $this->chars[$a].$this->chars[$b].$this->chars[$c].$this->chars[$d].$this->chars[$e].$this->chars[$f].$this->chars[$g];
                  mysql_query("
                    INSERT INTO `short` (
                      `id`,
                      `combination`,
                      `a`,
                      `b`,
                      `c`,
                      `d`,
                      `e`,
                      `f`,
                      `g`,
                      `url`,
                      `time`,
                      `status`
                    )
                    VALUES (
                      NULL,  '".($combination)."', '".($this->chars[$a])."',  '".($this->chars[$b])."',  '".($this->chars[$c])."',  '".($this->chars[$d])."',  '".($this->chars[$e])."',  '".($this->chars[$f])."',  '".($this->chars[$g])."',  '".($combination)."',  '".(time())."',  '0');");
                }
              }
            }
          }
        }
      }
    }
    $this->DBdisconnect();
  }
}
$ShortLink = new ShortLink();
$ShortLink->generate();
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T12:29:10+00:00Added an answer on June 6, 2026 at 12:29 pm

    See all those utf8_general_cis? The _ci part means that the collation is Case Insensitive.

    http://dev.mysql.com/doc/refman/5.6/en/charset-unicode-sets.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want develop some web product with using javascript 3d library like three.js But
Want to develop a query refinement tool just like Google Suggest so that i
I want to develop cross platform mobile app. I have seen frameworks listed below
I want to develop a website where people can find useful informations about other
I want to develop a program in c# that can target and application or
I want to develop an app which can Block the Invocation of some Blackberry
I want to develop app which will recognize object(like monument or something) present in
I want to develop an Android app in which I have key log press.
I want to develop a system that is similar to calculation of salary. A
I want to develop a mechanism for search, but I have some requirements for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.