Search Results

Search found 7 results on 1 pages for 'iggnition'.

Page 1/1 | 1 

  • doctrine findby relation

    - by iggnition
    I'm having trouble selecting a subset of data with doctrine. I have 3 tables Location Contact Contact_location The contact and location tables hold a name and an id the other table holds only ID's. For instance: Location loc_id: 1 name: detroit Contact contact_id: 1 name: Mike Contact_location loc_id: 1 contact_id: 1 In doctrine there is a many to many relation between the location and contact tables with contact_location as the ref_class. What i want to do is on my location page i want to find all contacts where for instance the loc_id = 1. I tried: $this->installedbases = Doctrine::getTable('contact')->findByloc_id(1); hoping doctrine would see the relation and get it, but it does not. How can i make doctrine search in relevant related tables? I read it can be done using Findby but i find the documentation unclear.

    Read the article

  • jquery ui datepicker is huge

    - by iggnition
    Hi, im trying to add a datepicker to my symfony application and i got it working, but the size of the datepicker is about 3 times bigger than normal (on the demo page). I have not edited any CSS, i just used the default ui lightness theme no modifications. Does anybody have any idea why the size is blown up so big? CSS: http://paste2.org/p/835414 tough i doubt that will be very usefull.

    Read the article

  • symfony get data from array

    - by iggnition
    Hi, I'm trying to use an SQL query to get data from my database into the template of a symfony project. my query: SQL: SELECT l.loc_id AS l__loc_id, l.naam AS l__naam, l.straat AS l__straat, l.huisnummer AS l__huisnummer, l.plaats AS l__plaats, l.postcode AS l__postcode, l.telefoon AS l__telefoon, l.opmerking AS l__opmerking, o.org_id AS o__org_id, o.naam AS o__naam FROM locatie l LEFT JOIN organisatie o ON l.org_id = o.org_id This is generated by this DQL: DQL: $this->q = Doctrine_Query::create() ->select('l.naam, o.naam, l.straat, l.huisnummer, l.plaats, l.postcode, l.telefoon, l.opmerking') ->from('Locatie l') ->leftJoin('l.Organisatie o') ->execute(); But now when i try to acces this data in the template by either doing: <?php foreach ($q as $locatie): ?> <?php echo $locatie['o.naam'] ?> or <?php foreach ($q as $locatie): ?> <?php echo $locatie['o__naam'] ?> i get the error from symfony: 500 | Internal Server Error | Doctrine_Record_UnknownPropertyException Unknown record property / related component "o__naam" on "Locatie" Does anyone know what is going wrong here? i dont know how to call the value from the array if the names in both query's dont work.

    Read the article

  • Doctrine does not export relation properly

    - by iggnition
    Hi, I've got a MySQL 5.1.41 database which i'm trying to fill with doctrine, but doctrine does not insert the relations correctly. My YAML is: Locatie: connection: doctrine tableName: locatie columns: loc_id: type: integer(4) fixed: false unsigned: false primary: true autoincrement: true org_id: type: integer(4) fixed: false unsigned: false primary: false notnull: false autoincrement: false naam: type: string(30) fixed: false unsigned: false primary: false notnull: true autoincrement: false straat: type: string(30) fixed: false unsigned: false primary: false notnull: true autoincrement: false huisnummer: type: integer(4) fixed: false unsigned: false primary: false notnull: true autoincrement: false huisnummer_achtervoegsel: type: string(3) fixed: false unsigned: false primary: false notnull: false autoincrement: false plaats: type: string(25) fixed: false unsigned: false primary: false notnull: true autoincrement: false postcode: type: string(6) fixed: false unsigned: false primary: false notnull: true autoincrement: false telefoon: type: string(12) fixed: false unsigned: false primary: false notnull: true autoincrement: false opmerking: type: string() fixed: false unsigned: false primary: false notnull: false autoincrement: false inloggegevens: type: string() fixed: false unsigned: false primary: false notnull: false autoincrement: false relations: Organisatie: local: org_id foreign: org_id type: one onDelete: CASCADE onUpdate: CASCADE Organisatie: connection: doctrine tableName: organisatie columns: org_id: type: integer(4) fixed: false unsigned: false primary: true autoincrement: true naam: type: string(30) fixed: false unsigned: false primary: false notnull: true autoincrement: false straat: type: string(30) fixed: false unsigned: false primary: false notnull: true autoincrement: false huisnummer: type: integer(4) fixed: false unsigned: false primary: false notnull: true autoincrement: false huisnummer_achtervoegsel: type: string(3) fixed: false unsigned: false primary: false notnull: false autoincrement: false plaats: type: string(25) fixed: false unsigned: false primary: false notnull: true autoincrement: false postcode: type: string(6) fixed: false unsigned: false primary: false notnull: true autoincrement: false telefoon: type: string(12) fixed: false unsigned: false primary: false notnull: true autoincrement: false opmerking: type: string(255) fixed: false unsigned: false primary: false notnull: false autoincrement: false relations: Locatie: local: org_id foreign: org_id type: many Now if a make an organisation and then create a location which has a foreignkey to organisation everything is fine. but when i try to update the org_id with phpmyadmin i get a contraint error. If i manually set the foreign key to ON_UPDATE CASCADE it does work. Why does doctrine not set this option? I got it to work in Propel, but i really want to use doctrine for this.

    Read the article

  • Check if hydrated doctrine result is NULL

    - by iggnition
    Hi, I'm trying to check if a result in my DQL is NULL. I got the following DQL query: $q = self::createQuery("l") ->select('i.*, s.aantal, m.naam, c.cat_naam, a.app_id') ->from('InstalledBase i, i.Spare s, i.Apparaat a, a.Categorie c, a.Merk m') ->execute(); return $q; Now i want to check if the s.aantal is NULL so i do: if(is_null($installedbase->Spare->spare_id)) when the variable is NOT null everything works, but when it is actually NULL i get a E notice message: Notice: Trying to get property of non-object in \installedbase\templates\_index.php on line 29 It does see that it is null though because the if condition is executed. Weird thing is i'm doing the exact same thing on another page where it works no problem. But i must be doing something wrong or stupid since those messages generally don't show for nothing. So can anybody explain this to me? :)

    Read the article

  • Symfony 1.4: use relations in fixtures with propel

    - by iggnition
    Hello, I just started to use the PHP symfony framework. Currently I'm trying to create fixture files in YAML to easily insert data into my MySQL database. Now my database has a couple of relations, I have the tables Organisation and Location. Organisation org_id (PK) org_name Location loc_id (PK) org_id (FK) loc_name Now I'm trying too link these tables in my fixture file, but for the life of me I cannot figure out how. Since the org_id is auto-incremented I can't simply use org_id: 1 In the location fixture. How can I fix this?

    Read the article

  • MySQL 5.1.41 leading zero is deleted

    - by iggnition
    Hello, I have a MySQL database where i want to store phonenumbers among other things. The fieldtype is INT(10) When I try to insert a number starting with a 0, like 0504042858 it's stored like 504042858. This only happens with zeros when the number start with any other number it's stored correctly. What am I doing wrong?

    Read the article

1