Search found 80 matches
- Sat Mar 22, 2014 11:02 pm
- Forum: Miscellaneous
- Topic: ANSI to UTF-8 - how to preserve special characters?
- Replies: 1
- Views: 14900
ANSI to UTF-8 - how to preserve special characters?
I've got about 3000 text files encoded in ANSI (windows-1252) that I'd like to convert to UTF-8. I used UTFCast to do that, but now all my special characters are turning up wonky - smart quotes, emdashes, accented letters, and so on are either appearing as question marks or weird characters. Is ther...
- Sat Mar 22, 2014 10:11 am
- Forum: PHP - Code
- Topic: View PHP files as HTML locally when encoded in UTF-8
- Replies: 8
- Views: 1602
Re: View PHP files as HTML locally when encoded in UTF-8
Thanks! Yeah, I'm thinking of changing to a different hosting provider at the end of the year, so I'll probably have to see what PHP version they're using.
- Sat Mar 22, 2014 9:30 am
- Forum: PHP - Code
- Topic: View PHP files as HTML locally when encoded in UTF-8
- Replies: 8
- Views: 1602
Re: View PHP files as HTML locally when encoded in UTF-8
It's all right - I reinstalled the WAMP server after uninstalling it, and it seems to work fine now. Are the older versions of PHP compatible with the newer ones, though? The PHP version in my WAMP package is 5.3.13, while my remote server uses PHP 5.2.17. A few functions have been deprecated since ...
- Sat Mar 22, 2014 2:41 am
- Forum: PHP - Code
- Topic: View PHP files as HTML locally when encoded in UTF-8
- Replies: 8
- Views: 1602
Re: View PHP files as HTML locally when encoded in UTF-8
Trying to install a local webserver has been maddening; I've tried a few times, and just wasted half of today trying again, this time using the WAMPserver package instead of trying to install all the individual components on my own (that never worked and I kept getting error messages). This worked f...
- Wed Mar 12, 2014 10:00 am
- Forum: PHP - Code
- Topic: View PHP files as HTML locally when encoded in UTF-8
- Replies: 8
- Views: 1602
Re: View PHP files as HTML locally when encoded in UTF-8
gah, I forgot to mention that. I mean by the browser that I open the file in, with the file stored locally and not on a webserver.
- Wed Mar 12, 2014 2:03 am
- Forum: PHP - Code
- Topic: View PHP files as HTML locally when encoded in UTF-8
- Replies: 8
- Views: 1602
View PHP files as HTML locally when encoded in UTF-8
I'd like to be able to have the HTML parts of PHP pages rendered locally in HTML, for designing purposes and convenience (e.g. easily accessing other pages via the nav bar), but it looks like it's only possible when encoding the file in something other than UTF-8 (usually ANSI). UTF-8 encoded files ...
- Thu Jun 13, 2013 4:09 pm
- Forum: Databases
- Topic: Delayed errors and Handler_read_rnd_next?
- Replies: 0
- Views: 3383
Delayed errors and Handler_read_rnd_next?
I'm getting a lot of delayed_errors in my MySQL status report, and it says: " The number of rows written with INSERT DELAYED for which some error occurred (probably duplicate key )." What does it mean by 'duplicate key'? I have no INSERT DELAYED commands at all. :/ Handler_read_rnd ( The n...
- Wed Jun 05, 2013 3:11 pm
- Forum: Databases
- Topic: ORDER BY query very slow - how to optimise?
- Replies: 5
- Views: 4811
Re: ORDER BY query very slow - how to optimise?
It's still really slow -> 0.0293 seconds. It's about five times faster, though!
Ok, I just did OPTIMIZE TABLE, and now it's down to 0.0009 seconds. whoa. I wasn't previously aware that there was such a thing.
I'm not sure if that solves the problem, though, or if it's just a temporary fix.
Ok, I just did OPTIMIZE TABLE, and now it's down to 0.0009 seconds. whoa. I wasn't previously aware that there was such a thing.
I'm not sure if that solves the problem, though, or if it's just a temporary fix.
- Wed Jun 05, 2013 1:48 pm
- Forum: Databases
- Topic: ORDER BY query very slow - how to optimise?
- Replies: 5
- Views: 4811
Re: ORDER BY query very slow - how to optimise?
I realised that other normally-quick queries are also running much slower than normal, so timings are inflated. But apparently that's due to some of the SELECT * FROM f_post queries stressing out the database in the first place. I did an ANALYZE, and it claims to be OK. Msg_type: status Msg_text: OK...
- Wed Jun 05, 2013 12:53 pm
- Forum: Databases
- Topic: ORDER BY query very slow - how to optimise?
- Replies: 5
- Views: 4811
ORDER BY query very slow - how to optimise?
On my site's forum there's a posting history page to see all the forum posts that a user has made. According to my webhost, this is using up a lot of server resources, but I don't know how to optimise it: SELECT * FROM f_posts WHERE author='$name' ORDER BY postid DESC LIMIT $x, $y The query takes 0....
- Tue Apr 23, 2013 3:19 pm
- Forum: Databases
- Topic: Replacing nested queries for optimisation?
- Replies: 12
- Views: 9567
Re: Replacing nested queries for optimisation?
Yeah, but I thought to join tables they have to share a column with common values?
Otherwise I'll just do a mass replace on the table and strip the /articles/, because I could always put that in when reading data instead.
Otherwise I'll just do a mass replace on the table and strip the /articles/, because I could always put that in when reading data instead.
- Tue Apr 23, 2013 2:17 pm
- Forum: Databases
- Topic: Replacing nested queries for optimisation?
- Replies: 12
- Views: 9567
Re: Replacing nested queries for optimisation?
I have a problem replicating this with the recent comments script, because the fields I want to join aren't exactly identical: SELECT c.commentid, c.subject, a.author, a.postdate FROM comments c JOIN articles a ON c.page = a.link ORDER BY c.commentid DESC LIMIT 6" In this case, c.page is format...
- Tue Apr 23, 2013 2:01 pm
- Forum: Databases
- Topic: Replacing nested queries for optimisation?
- Replies: 12
- Views: 9567
Re: Replacing nested queries for optimisation?
Ah, ok. Thanks!
- Tue Apr 23, 2013 1:53 pm
- Forum: Databases
- Topic: Replacing nested queries for optimisation?
- Replies: 12
- Views: 9567
Re: Replacing nested queries for optimisation?
Wait, sorry.
I'm trying to get the author from the f_posts table, not the f_threads table, because the former only provides the name of the OP. How do I get the author for the individual post?
I'm trying to get the author from the f_posts table, not the f_threads table, because the former only provides the name of the OP. How do I get the author for the individual post?
- Tue Apr 23, 2013 1:46 pm
- Forum: Databases
- Topic: Replacing nested queries for optimisation?
- Replies: 12
- Views: 9567
Re: Replacing nested queries for optimisation?
Hi,
I indexed threadid and postdate, and it's down to 0.0006 seconds. Thanks for your help!
I indexed threadid and postdate, and it's down to 0.0006 seconds. Thanks for your help!