smellyrat / drydock

Automatically exported from code.google.com/p/drydock
0 stars 0 forks source link

board setup NULL inserts must be 0 for SQLite #50

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
SQLite doesn't like null values in insert statements, so I tried to wrap
things in single quotes, but that completely broke templates and posting. 
So instead we should insert 0 instead.

current (wrong):
update drydock_boards set id=1, globalid=3, name='test', folder='test',
about='test', rules='test', boardlayout ='drydock-image', perpg=20,
perth=4, allowedformats = 7, tpix=1, rpix=1, tmax=100, thumbres=150,
maxfilesize=2097152, maxres=3000, pixperpost=8, forced_anon=, customcss=,
allowvids=, filter=, requireregistration=, hidden=, tlock=, rlock= where id=1

my idea (also wrong):
update drydock_boards set id=1, globalid=3, name='test', folder='test',
about='test', rules='test', boardlayout ='drydock-image', perpg=20,
perth=4, allowedformats = 7, tpix=1, rpix=1, tmax=100, thumbres=150,
maxfilesize=2097152, maxres=3000, pixperpost=8, forced_anon='',
customcss='', allowvids='', filter='', requireregistration='', hidden='',
tlock='', rlock='' where id=1

What needs to be done (and correct):
update drydock_boards set id=1, globalid=3, name='test', folder='test',
about='test', rules='test', boardlayout ='drydock-image', perpg=20,
perth=4, allowedformats = 7, tpix=1, rpix=1, tmax=100, thumbres=150,
maxfilesize=2097152, maxres=3000, pixperpost=8, forced_anon=0, customcss=0,
allowvids=0, filter=0, requireregistration=0, hidden=0, tlock=0, rlock=0
where id=1

See:
http://code.google.com/p/drydock/source/browse/branches/drydock-june11-SQLITE-TE
ST-BUILD/dbi/SQLite-mod.php#438

Original issue reported on code.google.com by TaQS...@gmail.com on 19 Dec 2008 at 10:49

GoogleCodeExporter commented 9 years ago
I think this is fixed now because I was playing with the SQLite stuff and it 
didn't
throw a fit, so moving to needsverify

Original comment by TaQS...@gmail.com on 15 Apr 2009 at 10:33

GoogleCodeExporter commented 9 years ago
Welp, putting it back as needing work because it's still having the same issue, 
even
though I thought it was fixed.  Apparently not!

Original comment by TaQS...@gmail.com on 28 May 2009 at 9:30

GoogleCodeExporter commented 9 years ago
Nevermind I am fixing this by changing the templates.

Original comment by TaQS...@gmail.com on 28 May 2009 at 10:05

GoogleCodeExporter commented 9 years ago

Original comment by TaQS...@gmail.com on 14 Jul 2009 at 9:48