Search Results

Search found 3 results on 1 pages for 'lzyy'.

Page 1/1 | 1 

  • why this left join query failed to load all the data in left table ?

    - by lzyy
    users table +-----+-----------+ | id | username | +-----+-----------+ | 1 | tom | | 2 | jelly | | 3 | foo | | 4 | bar | +-----+-----------+ groups table +----+---------+-----------------------------+ | id | user_id | title | +----+---------+-----------------------------+ | 2 | 1 | title 1 | | 4 | 1 | title 2 | +----+---------+-----------------------------+ the query SELECT users.username,users.id,count(groups.title) as group_count FROM users LEFT JOIN groups ON users.id = groups.user_id result +----------+----+-------------+ | username | id | group_count | +----------+----+-------------+ | tom | 1 | 2 | +----------+----+-------------+ where is the rest users' info? the result is the same as inner join , shouldn't left join return all left table's data? PS:I'm using mysql

    Read the article

  • curios about CCSpriteBatchNode's addchild method

    - by lzyy
    when diving into "learn cocos2d game development with ios5", in ch08 in EnemyCache.m -(id) init { if ((self = [super init])) { // get any image from the Texture Atlas we're using CCSpriteFrame* frame = [[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameByName:@"monster-a.png"]; batch = [CCSpriteBatchNode batchNodeWithTexture:frame.texture]; [self addChild:batch]; [self initEnemies]; [self scheduleUpdate]; } return self; } so batch is with texture "monster-a.png" in EnemyEntity.m's initWithType method switch (type) { case EnemyTypeUFO: enemyFrameName = @"monster-a.png"; bulletFrameName = @"shot-a.png"; break; case EnemyTypeCruiser: enemyFrameName = @"monster-b.png"; bulletFrameName = @"shot-b.png"; shootFrequency = 1.0f; initialHitPoints = 3; break; case EnemyTypeBoss: enemyFrameName = @"monster-c.png"; bulletFrameName = @"shot-c.png"; shootFrequency = 2.0f; initialHitPoints = 15; break; default: [NSException exceptionWithName:@"EnemyEntity Exception" reason:@"unhandled enemy type" userInfo:nil]; } if ((self = [super initWithSpriteFrameName:enemyFrameName])) { //... } so the returned object may be in 3 different frame. since Only the CCSprites that are contained in that texture can be added to the CCSpriteBatchNode, obviously, 'monster-b.png' is not contained in 'monster-a.png', why the different enemy can still be added to the batch?

    Read the article

  • nginx doesn't parse php request

    - by lzyy
    env: ubuntu 9.10 / use gotdeb source / php version 5.3.1 / php5-fpm installed / php5-fpm is running , and listening 9000 port test by 2 commands below pgrep php5-fpm telnet localhost 9000 however if I visit from anthor computer in LAN ,using this address http://192.168.1.103/index.php the browser ask me to save this index.php , but if visit index.php , everything goes well sites-enabled/default file content env: ubuntu 9.10 / use gotdeb source / php version 5.3.1 / php5-fpm installed / php5-fpm is running , and listening 9000 port test by 2 commands below pgrep php5-fpm telnet localhost 9000 however if I visit from anthor computer in LAN ,using this address http://192.168.1.103/index.php the browser ask me to save this index.php , but if visit index.html , everything goes well sites-enabled/default file content location ~ \.php$ { fastcgi_pass 127.0.0.1:9000 fastcgi_index index.php fastcgi_param SCRIPT_FILENAME /var/www/$fastcgi_script_name include fastcgi_params }

    Read the article

1