datatypes

PHP prepared postgres query fails with:"could not determine data type of parameter $1"

Hello everyone. I currently have to implement a query on a postgres database using a prepared statement. My current code looks like this: $arrFilter = array("", ""); $result = $db->prepare("select_music", "SELECT * FROM tblmusik WHERE lm_titel LIKE '%" . "$1" . "%' AND lm_text LIKE '%" . "$2" . "%'); ( db->prepare() just executes p...

How do you generate a random double between these points?

37.807614 to 37.786996 The randomly generated double must have the same precision (num of digits) as those above. For example, 37.792242 would be good, whereas 37.7823423425 would be bad. ...

SQL Server data types: Store 8-digit unsigned bumber as INT or as CHAR(8) ?

Hello, i think the title says everything. Is it better(faster,space-saving according memory and disk) to store 8-digit unsigned numbers as Int or as char(8) type? Would i get into trouble when the number will change to 9 digits in future when i use a fixed char-length? Background-Info: i want to store TACs Thanks ...

Is there any reason to use Core Graphics data types when working with UIView objects

Is there any real need to do this: CGFloat x = 10.0f; CGFloat y = 20.0f; someView.center = CGPointMake(x, y); Instead of this: float x = 10.0; float y = 20.0; someView.center = CGPointMake(x, y); ...aside from style considerations? Are there any performance implications at all? ...