Jump to content

aaron1988

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

aaron1988's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Also just do you no you have syntax error, as i tried import to see what happened if your code worked for actual import and i get: Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2 Error No: 1064 INSERT INTO product_image (product_id, image) VALUES
  2. Hi cheers for that code but your are correct in a sense i dont want the else statement but what i need to happen is once it does the import if some of the product_image fields are empty it skips those and just imports the ones which has DATA in. Regards, Aaron
  3. Hi wondered if someone could help me i have this code: if (isset($data['product_image'])) { foreach ($data['product_image'] as $image) { $image = $image.".jpg"; $image = str_replace (" ", "", $image); $filename = '/home/purchase/public_html/fancydresscostumesonline.co.uk/image/'. $image; if (file_exists($filename)) { $this->db->query("INSERT INTO " . DB_PREFIX . "product_image SET product_id = '" . (int)$product_id . "', image = '" . $this->db->escape($image) . "'"); } else { $this->db->query("INSERT INTO " . DB_PREFIX . "product_image SET product_id = '" . (int)$product_id . "', image = 'no_image.jpg'"); } } } This part of the code adds a jpg at the end of the product_image additional images so in my csv the 10 columns which have additional numbers for example in my csv it has: say 00532 so this code adds 00532.jpg once imported the the next part which is the else statement no_image.jpg adds a no_image.jpg but instead of it inserting a no_image.jpg for all the blank cells i would like it to SKIP the blank cells for the additional images which is product_image so if no number in the cell it SKIPS it. but have no clue how to do it. Hope someone can help Regards, Aaron
  4. Yes its working now lol, but to the code i posted above how can i add class="icon" please? Thanks Aaron
  5. I have this piece of code but doesnt work <? /** * User has already logged in, so display relavent links, including * a link to the admin center if the user is an administrator. */ if($session->logged_in){ echo "<h1>Logged In</h1>"; echo "<table style=\"width:100%; border:0; background-image:url('img.jpg'); background-position:center center; background-repeat:no-repeat;\"><tr><td>Welcome <b>$session->username</b>.</td></tr></table> <br><br>"; } ?>
  6. hi i have a code <? /** * User has already logged in, so display relavent links, including * a link to the admin center if the user is an administrator. */ if($session->logged_in){ echo "<h1>Logged In</h1>"; echo "Welcome <b>$session->username</b>, you are logged in. <br><br>" ."[<a href=\"userinfo.php?user=$session->username\">My Account</a>] " ."[<a href=\"useredit.php\">Edit Account</a>] "; if($session->isAdmin()){ echo "[<a href=\"admin/admin.php\">Admin Center</a>] "; } echo "[<a href=\"process.php\">Logout</a>]"; } else{ ?> i want to remove the ."[<a href=\"userinfo.php?user=$session->username\">My Account</a>] " ."[<a href=\"useredit.php\">Edit Account</a>] "; if($session->isAdmin()){ echo "[<a href=\"admin/admin.php\">Admin Center</a>] "; and add an image tag so the echo "Welcome <b>$session->username</b>, you are logged in. <br><br>" shows on that image Cheers Aaron
  7. hi i was wondering would any one be able to help me out on this i have this site with these images on http://www.3dmodellingart.co.uk/inde...=7&Ite mid=45 and under the images i want add to basket and quantity how many they wanna buy and also i want checkout underneath images as well of next to them with it used by paypal does any one know how i can do that please Thanx Aaron
×
×
  • 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.