SMF Shop

SMFShop => General SMFShop Discussion => Topic started by: Flurrywinde on June 01, 2006, 11:55:04 pm

Title: Got a database error
Post by: Flurrywinde on June 01, 2006, 11:55:04 pm
I use Opera, so the last page I had opened is still there whenever I run Opera. I just happened to shutdown the computer right after adding an new item. Thus, Opera opened up with this url: http://herbaloutfitters.com/smf-pbw/index.php?action=shop_items_add;step=2

This resulted in:

Quote
Database 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 '
'',
,

File: /home/herbal7/public_html/smf-pbw/Sources/shop/ShopAdmin.php
Line: 238

I looked at this file, and it seems like maybe there should be a check in it for cases where all the POST data is empty. Right now, the code creates empty strings and the like, but if they're all empty, maybe it should just abort and return to the forum home page?

Just my two cents!
Title: Re: Got a database error
Post by: Daniel15 on June 02, 2006, 05:04:07 pm
Hi,
 Yeah, I should probably clean that up. You see, when I started coding SMFShop (December 2004), I was still a beginner at PHP. If you look through the SMFShop code, you'll see some of my older code, and some of my newer code (the newer code is a lot cleaner). So, maybe I'll clean this up in the future.

P.S I use Opera as well, but I've set it to start with no pages. I absolutely love Opera, especially the in-built email reader, and the custom buttons :)
Title: Re: Got a database error
Post by: Flurrywinde on June 03, 2006, 02:16:29 am
Is that really your hard drive temperature???
Title: Re: Got a database error
Post by: Daniel15 on June 03, 2006, 09:52:37 am
Yes, it is :)
My signature is dynamic (it is produced by a PHP script). The hard drive temperature, uptime, net sent and net received are updated every 5 minutes using a program that I wrote. The 'My Local Time' is always updated :)

Just go to http://www.daniel15.com/sig/sig.png and keep refreshing it. You'll see that the image is dynamic
Title: Re: Got a database error
Post by: Flurrywinde on June 03, 2006, 09:58:24 am
Hard drive temp of your home computer or the server's? And is the code for this available to download somewhere? I like it!