Skip to content

Instantly share code, notes, and snippets.

View hobodave's full-sized avatar
🎯
Focusing

David Abdemoulaie hobodave

🎯
Focusing
View GitHub Profile
use test
Database changed
mysql> CREATE TABLE `a` (
-> `id` int(11) DEFAULT NULL
-> ) ENGINE=InnoDB DEFAULT CHARSET=utf8
-> ;
Query OK, 0 rows affected (0.01 sec)
mysql> INSERT INTO a (id) VALUES (1),(2),(3);
Query OK, 3 rows affected (0.01 sec)
<?php
class Hobo_Query
{
/**
* constant for SELECT queries
*/
const SELECT = 0;
/**
require "spec/expectations"
require "webrat"
require "webrat/mechanize"
Webrat.configure do |config|
config.mode = :mechanize
end
World do
session = Webrat::MechanizeAdapter.new
./features/support/env.rb:10
/Library/Ruby/Gems/1.8/gems/cucumber-0.3.96/bin/../lib/cucumber/rb_support/rb_language.rb:95:in `call'
/Library/Ruby/Gems/1.8/gems/cucumber-0.3.96/bin/../lib/cucumber/rb_support/rb_language.rb:95:in `create_world'
/Library/Ruby/Gems/1.8/gems/cucumber-0.3.96/bin/../lib/cucumber/rb_support/rb_language.rb:53:in `begin_scenario'
/Library/Ruby/Gems/1.8/gems/cucumber-0.3.96/bin/../lib/cucumber/step_mother.rb:205:in `begin_scenario'
/Library/Ruby/Gems/1.8/gems/cucumber-0.3.96/bin/../lib/cucumber/step_mother.rb:204:in `each'
/Library/Ruby/Gems/1.8/gems/cucumber-0.3.96/bin/../lib/cucumber/step_mother.rb:204:in `begin_scenario'
/Library/Ruby/Gems/1.8/gems/cucumber-0.3.96/bin/../lib/cucumber/language_support/language_methods.rb:5:in `before'
/Library/Ruby/Gems/1.8/gems/cucumber-0.3.96/bin/../lib/cucumber/step_mother.rb:220:in `before'
/Library/Ruby/Gems/1.8/gems/cucumber-0.3.96/bin/../lib/cucumber/step_mother.rb:219:in `each'
<?php
error_reporting(E_ALL);
$options['storage']['registry'] = 1;
if (isset($options['storage']) &&
isset($options['storage']['registry']) &&
isset($options['storage']['registry']['key']))
{
echo "WTF";
mysql> select count(*) from tickets where company_id = 6;
+----------+
| count(*) |
+----------+
| 28524 |
+----------+
1 row in set (0.00 sec)
mysql> select count(*) from tickets where company_id = 6 AND parent_id = 0;
+----------+
mysql> use sentact_sbch
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show triggers\G
*************************** 1. row ***************************
Trigger: log_building_insert
Event: INSERT
Table: buildings
<?php
class App_Auth_Adapter_Doctrine_Table implements Zend_Auth_Adapter_Interface
{
/**
* Database Connection
*
* @var Zend_Db_Adapter_Abstract
*/
protected $_conn = null;
function updateTotalCost() {
var total = 0.00;
$('shoppingCart').select('td.cost').each(function(td) {
total += parseFloat(td.innerHTML)
})
total_cell = $('total_cell')
total_cell.update(total.toFixed(2))
new Effect.Highlight(total_cell)
}
<?php
Doctrine_Query::create()
->update('dMmLineItem li')
->set('size', 'Default')
->where('size = ?', '0')
->orWhere('size = ?', '')
->execute();