# Active Record Invalid Statement

**URL:** <https://www.ruby-forum.com/t/active-record-invalid-statement/132680>\
**Category:** Ruby\
**Created:** [March 23, 2008, 9:32am UTC](https://www.ruby-forum.com/t/active-record-invalid-statement/132680 "2008-03-23T09:32:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jh100000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b2d939/32.png) [@jh100000](https://www.ruby-forum.com/u/jh100000)\
**Post date:** [March 23, 2008, 9:32am UTC](https://www.ruby-forum.com/t/active-record-invalid-statement/132680/1 "2008-03-23T09:32:33Z")

</div>

Can anyone help identify the cause of the exception below?

Mysql::Error: Lost connection to MySQL server during query: SELECT \*  
FROM `pages` WHERE (`pages`.`url` =  
‘[http://vidsys.com/Solutions/Surveillance-Solutions/tabid/42902/Default.aspx](http://vidsys.com/Solutions/Surveillance-Solutions/tabid/42902/Default.aspx)’)  
LIMIT 1 (ActiveRecord::StatementInvalid)

I assume this is a problem related to the URL? I am thinking it might  
be the ‘-’ in the URL.

I am processing a collection of URLs, all work, except for this one.

Any help would be appreciated.

Best,

John

---

<div class="post-metadata">

**Author:** ![jh100000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b2d939/32.png) [@jh100000](https://www.ruby-forum.com/u/jh100000)\
**Post date:** [March 23, 2008, 1:11pm UTC](https://www.ruby-forum.com/t/active-record-invalid-statement/132680/2 "2008-03-23T13:11:39Z")

</div>

Hi,

You’ll have to have a look at your SQL server’s logs, I would imagine.  
This  
isn’t a problem in any Ruby code so far as i can tell.

Cheers,  
Arlen.
