Jump to content
Sign in to follow this  
FastcomDirect

Easy Populate 2.76

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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×