Lines Matching refs:bin
28 $bin = '';
31 $bin .= '1';
34 $bin .= '0';
37 return $bin;
78 $bin = ($bits < 32) ? decbin($value) : dec32bin($value, $bits);
79 $sql = sprintf("INSERT INTO test(id, bit_value) VALUES (%s, b'%s')", $value, $bin);
80 for ($i = 0; ($i < strlen($bin)) && ($bin[$i] == '0'); $i++)
82 $bin2 = substr($bin, $i, strlen($bin));
88 …$sql = sprintf("SELECT bin(bit_value) AS _bin, id, bit_value, bit_null FROM test WHERE id = %s", $…
100 if (($value != $row['id']) || (($bin != $row['_bin']) && ($bin2 != $row['_bin']))) {
102 … printf("[008 - %d] Insert of %s in BIT(%d) column might have failed. id = %s, bin = %s (%s/%s)\n",
103 $bits, $value, $bits, $row['id'], $row['_bin'], $bin, $bin2);
108 printf("%10s %64s\n%10s %64s\n", '_bin', $row['_bin'], 'insert', $bin);