Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $db = 'xxxx';
- $server = 'xxxxxxxxxxxxx';
- $user = 'xxxxxx';
- $pw = 'xxxxxxx';
- $con = new mysqli($server, $user, $pw);
- if(mysqli_connect_errno())
- {
- printf("Verbindung fehlgeschlagen: %s" . mysqli_connect_error());
- exit();
- } else {
- echo "Erfolgreich verbunden!!!<br>";
- $con->select_db($db);
- }
- $hauptkategorie = 1;
- for($hauptkategorie = 1; $hauptkategorie <= 7; $hauptkategorie++){
- $i = 1;
- while($i <= 5){
- $query = 'INSERT INTO `xt_categories` (
- `categories_id` ,
- `external_id` ,
- `permission_id` ,
- `categories_owner` ,
- `categories_image` ,
- `parent_id` ,
- `categories_status` ,
- `categories_template` ,
- `listing_template` ,
- `sort_order` ,
- `products_sorting` ,
- `products_sorting2` ,
- `top_category` ,
- `date_added` ,
- `last_modified` ,
- `google_product_cat`
- )
- VALUES (
- "0", NULL , "0", "1", NULL , ' .$hauptkategorie . ', "1", "", "", "0", "", "", "0", NULL , "2013-09-14 20:22:23", "New"
- )';
- $con->query($query);
- $i++;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement