This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set number of shortcodes to generate | |
$shortcodes = 10000000; | |
// Loop through and create unique shortcodes | |
while ($shortcodes) { | |
$shortcode = generateShortcode(); | |
$checkSQL = "SELECT shortcode FROM shortcodes WHERE shortcode = '" . $shortcode . "'"; | |
$checkResult = $mysqli->query($checkSQL); | |
// If doesn't exist, insert into database |