Question: I have two tables with this structure:

Table one:
ID Description

Table two:
ID Name

I have to echo only the id's of both tables but i don't know how to compare.
i can show my idea using a stupid example:

```
if($id is in the first table  AND $id is in the second table){
echo $id;
echo $description;
echo $name
}

```

How to do this?
Thanks!

Answer: 
After some computation based on your answer, I found out that `360*4` is dividable by anything up to 32, whereas `360*4+8*4` is even dividable by 64. So I guess the reason for the error is that GIL in your case tries to align image rows at 64 byte boundaries and therefore doesn't store them contiguously.

Because of this it is always advised to use the generic iterator interface instead of messing with the raw memory directly, otherwise you have to be completely sure about any such alignment conventions (but maybe they are perfectly standardized and can be read somewhere in the documentation).
OK I found how to fix it, but still don't know the reason :)
This works for images with width 360 in my case.

```
UInt32 *temp = (UInt32*)&src(0,0);
for( int i = 0; i < numPixels; ++i ){   
  if( i%360==0 && i!=0 ){
    temp += 8;
  }
  boost::gil::bgr8_pixel_t pixk( (( *temp) & 0xff), ( (*temp>>8) & 0xff), ((*temp >> 16 )& 0xff));
  *itD++ = pixk;
  temp += 1;
}

```

It is even better to use this one for the iOS platform:

```
UInt8 *temp = (UInt8*)&src(0,0);
for( int i = 0; i < numPixels; ++i ){   
  if( i%360==0 && i!=0 ){
    temp += 8*4;
  }
  boost::gil::bgr8_pixel_t pixk( *temp, *(temp+1), *(temp+2));
  *itD++ = pixk;
  temp += 4;
}

```

Getting rid of the other iterator further improves speed (tested on iOS).