1064 error in your SQL syntax
Swarmer 0
From: -
From: -
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
Philipp
From: Vienna, Austria
Administrator
1340From: Vienna, Austria
1064 error in your SQL syntax
Here the fix. Open cadmin/mod_download.php in an editor and replace:
with:
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
Swarmer
OP
0
From: -
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§ion=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§ion=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§ion=downloads')">
<img src="https://www.contentteller.com/thumb.php?img=_3.jpg§ion=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§ion=downloads')">
<img src="https://www.contentteller.com/thumb.php?img=_4.jpg§ion=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§ion=downloads')">
<img src="https://www.contentteller.com/thumb.php?img=_5.jpg§ion=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
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§ion=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§ion=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§ion=downloads')">
<img src="https://www.contentteller.com/thumb.php?img=_3.jpg§ion=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§ion=downloads')">
<img src="https://www.contentteller.com/thumb.php?img=_4.jpg§ion=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§ion=downloads')">
<img src="https://www.contentteller.com/thumb.php?img=_5.jpg§ion=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
Philipp
From: Vienna, Austria
Administrator
1340From: Vienna, Austria
1064 error in your SQL syntax
Sounds like a bug. Can you post the exact steps to reproduce this error?
Sounds like a bug. Can you post the exact steps to reproduce this error?
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