[PHP-DB] insert NULL to mysql table.

2003-07-02 Thread anders thoresson
NOT NULL, UNIQUE (i_date), i_number INT, i_editor INT ); Isn't /0 the escapestring for NULL? -- anders thoresson -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] insert NULL to mysql table.

2003-07-02 Thread anders thoresson
-- anders thoresson -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] should each php-script clean up it's mysql connections

2003-07-02 Thread anders thoresson
was $articlequery and not $query. The query saved to $query was apperently some old query used in another php-script within my site. Therefore I wonder: Is it a good behavior to end connections or let every php-script clean up after it self in some way? -- anders thoresson -- PHP Database Mailing List (http

[PHP-DB] mysql lock

2003-06-27 Thread anders thoresson
on the table, in between which I do some PHP work, and then release the lock several queries and lines of PHP code later? -- anders thoresson -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] generating sequence without AUTO_INCREMENT

2003-06-26 Thread anders thoresson
, and then adding the issue_number next in turn to the new issue, or, if the year differs start over from 1 again. Is there a smarter way of doing this? -- anders thoresson -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] generating sequence without AUTO_INCREMENT

2003-06-26 Thread anders thoresson
MAX(issue_number)+1 where YEAR(date) = Year(NOW()) I continued to work while waiting for ideas, and have now manage to get a script that work. I'm getting the next issue number this way: // Connect to database to get latest issue number from table un_issue db_connect($dbuser,