This website can use cookies to improve the user experience

This website can use cookies to improve the user experience and to provide certain services and functions to users. Cookies contain small amounts of information (such as login information and user preferences) and will be stored on your device.

Enable All Cookies Privacy Policy

1064 error in your SQL syntax


avatar
Swarmer 0
From: -
1064 error in your SQL syntax

Hi, i have the thumb.php javascript in my "description" text area. it works fine on the site but when i do a Search & Replace from the admin i get a "1064 error in your SQL syntax;" it is alerting me to the apostrophe's in the thumb.php javascript. i don't really have an issue with this as it functions fine on the site, i am more concerned about the database. will this error cause issues with reinstalling the database at a future time or should i remove the javascript from this location? thanks

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


1 Re: 1064 error in your SQL syntax
avatar
Administrator
1340
From: Vienna, Austria
1064 error in your SQL syntax

Here the fix. Open cadmin/mod_download.php in an editor and replace:

$out_field = str_replace("$zid", "$extra1", $rows[$search_field]);

with:

$out_field = addslashes(str_replace("$zid", "$extra1", $rows[$search_field]));
1 Re: 1064 error in your SQL syntax
avatar
OP 0
From: -
1064 error in your SQL syntax

i'm not sure if this is what you want. i have a html template that i use for my descriptions. in my download text area i paste this


new item text description here.<p>

<table border="0">
<tr>
<td height="25">
</td>
</tr>
</table>
<b>Screenshots:</b><br>
<div align="center">
<table border="0" cellspacing="0" cellpadding="3">
<tr>
<td align="center">
<a href="https://www.contentteller.com/javascript:FullWin('thumb.php?img=_1.jpg&action=full&section=downloads')">
<img src="https://www.contentteller.com/thumb.php" alt="" border="0"></a><br>
</td>
<td align="center">
<a href="https://www.contentteller.com/javascript:FullWin('thumb.php?img=_2.jpg&action=full&section=downloads')">
<img src="https://www.contentteller.com/thumb.php" alt="" border="0"></a><br>
</td>
<td align="center">
<a href="https://www.contentteller.com/javascript:FullWin('thumb.php?img=_3.jpg&action=full&section=downloads')">
<img src="https://www.contentteller.com/thumb.php?img=_3.jpg&section=downloads" alt="" border="0"></a><br>
</td>
<td align="center">
<a href="https://www.contentteller.com/javascript:FullWin('thumb.php?img=_4.jpg&action=full&section=downloads')">
<img src="https://www.contentteller.com/thumb.php?img=_4.jpg&section=downloads" alt="" border="0"></a><br>
</td>
<td align="center">
<a href="https://www.contentteller.com/javascript:FullWin('thumb.php?img=_5.jpg&action=full&section=downloads')">
<img src="https://www.contentteller.com/thumb.php?img=_5.jpg&section=downloads" alt="" border="0"></a><br>
</td>
</tr>
</table></div><p>


then when i use the Search and Replace in the download section admin to change this part of the html

Search for: <td height="25">
in field: text
Replace with: <td height="50">

I got this result,

Error: 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 'thumb.php?img=picture_1.jpg&action=full§ion=downloads')"> <img src="https://www.contentteller.com/thumb.php' at line 1
1 Re: 1064 error in your SQL syntax
avatar
Administrator
1340
From: Vienna, Austria
1064 error in your SQL syntax

Sounds like a bug. Can you post the exact steps to reproduce this error?

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.