[Solar-talk] _hasOne Help

Raymond Kolbe rkolbe at gmail.com
Wed Nov 14 14:45:14 CST 2007


You know what....I do have data in the DB....the id was just set to 0
instead of 1....auto inc wasn't on or something.

It does work ;)

Thank you!!!!

Raymond K.

On Nov 14, 2007 3:41 PM, Rodrigo Moraes <rodrigo.moraes at gmail.com> wrote:

> On Nov 14, 2007 6:23 PM, Raymond Kolbe wrote:
> > Using your example (not the pastbin, but from above), it returns NULL
> now
> > when trying to get $rest->market->name or $rest->markets->name. Is there
> > another way I should try accessing the data?
>
> Hmm, I tested it and it worked: http://pastebin.com/m77267057
>
> It is null probably because it haven't found any related record. Try
> to add a "restaurants" record with "market" = 1. Add a record with
> "id" = 1 to "markets", and in your example it'll dump the market
> "name".
>
> -- rodrigo
> _______________________________________________
> Solar-talk mailing list
> Solar-talk at lists.solarphp.com
> http://mailman-mail3.webfaction.com/listinfo/solar-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman-mail3.webfaction.com/pipermail/solar-talk/attachments/20071114/42129967/attachment.html


More information about the Solar-talk mailing list