Hi,
I have a problem with date function.
$gen_pos = mktime(0,0,1,10,25,2009);
$d1 = date("Y-m-d", $gen_pos); // 2009-10-25
$d2 = date("Y-m-d", $gen_pos + (1*24*60*60)); // 2009-10-25
$d3 = date("Y-m-d", $gen_pos + (2*24*60*60)); // 2009-10-26
$d4 = date("Y-m-d", $gen_pos + (3*24*60
thx it looks good
[EMAIL PROTECTED] napsal(a):
For large tables, I generally create a "static_rand" column, and pre-populated
it with random numbers and create an index on it.
Then, after "using up" the records, I have application logic to reset those
records (and only those records) to new r
Hi,
i would ask what is the best method for random select from database. I
have table with 20k items..
- If i use ,,select * from table order by rand() limit 3", the query
took 0.0524 sec ... its slightly enough
- but if i generate rand id and then i use ,,select where id
Korgan napsal(a):
Jim Lucas napsal(a):
Korgan wrote:
Hi,
I have a problem with array_key_exists in if statement.
I have a class with this function
class XXX {
private items = array();
...
...
...
public function addXXX($id, $count)
{
$count = (int)$cout;
Let me point
Jim Lucas napsal(a):
Korgan wrote:
Hi,
I have a problem with array_key_exists in if statement.
I have a class with this function
class XXX {
private items = array();
...
...
...
public function addXXX($id, $count)
{
$count = (int)$cout;
Let me point at it
Check
Error reporting is set on E_ALL
notice: it change value if I add the item which isnt in array
Lupus Michaelis wrote:
Korgan a écrit :
public function addXXX($id, $count)
{
$count = (int)$cout;
Try to work with error_reporting set to E_ALL ;)
session_start();
var_dump
Hi,
I have a problem with array_key_exists in if statement.
I have a class with this function
class XXX {
private items = array();
...
...
...
public function addXXX($id, $count)
{
$count = (int)$cout;
if (!array_key_exists($id, $this->items))
$this->items[
7 matches
Mail list logo