Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Easy Populate 2.76


Guest

Recommended Posts

I am trying to upload product descriptions with html. It works fine if I upload the product through the webform, but it does not work through ezpopulate. It is generating errors of this type:

 

File uploaded.

Temporary filename: /tmp/phpCJqom5

User filename: EP2005Nov12-2210.txt

Size: 21040

| V 4.0 | jump9.jpg | Jumpsoles | | | | | | Jumpsoles | | | | | | Jumpsoles | | | | | | 59.95 | 5.00 | | 0000-00-00 | 95 | 2 | Size | Gr??e | Talla | 14 | Small (US | | | +0.0000 | 15 | Medium (US | | | +0.0000 | 16 | Large (US | | | +0.0000 | 17 | XL (US Men | XL (US Men | XL (US Men | +0.0000 | JumpUSA | Sporting G | | | | | | | | | | | | | | | | | | | | Taxable Go | Active Updated

1064 - 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'

 

It usually gets hung an apostrophe. Since this does not work in the SQL. Anyone have an idea how to fix this. I have tried putting quotation marks arround the html in my excel file, but it does not work.

Link to comment
Share on other sites

I am also trying to plug in some html, but in the directory name.

This is mostly to give it color and size.

I have backslashed the " and ' in the html but for some reason \" gets converted to " and \' get converted to ' and when html reads it it reads it as is and does not reconvert it to " and '.

I don't get any errors.

 

Does anyone know a fix other than changing it manually from here into god knows what that may screw up other parts of the script/osCommerce:

				if (ini_get('magic_quotes_runtime') == 1){
				// The magic_quotes_runtime are on, so lets account for them
				// check if the last character is a quote;
				// if it is, chop off the quotes.
				if (substr($items[$i],-1) == '"'){
					$items[$i] = substr($items[$i],2,strlen($items[$i])-4);
				}
				// now any remaining doubled double quotes should be converted to one doublequote
				$items[$i] = str_replace('\"\"',""",$items[$i]);
				if ($replace_quotes){
					$items[$i] = str_replace('\"',""",$items[$i]);
					$items[$i] = str_replace("\'","'",$items[$i]);
				}
			} else { // no magic_quotes are on
				// check if the last character is a quote;
				// if it is, chop off the 1st and last character of the string.
				if (substr($items[$i],-1) == '"'){
					$items[$i] = substr($items[$i],1,strlen($items[$i])-2);
				}
				// now any remaining doubled double quotes should be converted to one doublequote
				$items[$i] = str_replace('""',""",$items[$i]);
				if ($replace_quotes){
					$items[$i] = str_replace('"',""",$items[$i]);
					$items[$i] = str_replace("'","'",$items[$i]);
				}
			}

Edited by cbp
Link to comment
Share on other sites

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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