[PHP-DB] query question

2003-03-25 Thread 2b4ever php
heyas all, the database: KID MID 1 1 1 2 2 2 I have the following code: $PID = 1; $UID = 2; $res = mysql_query(SELECT KID FROM kpr WHERE MID = '$PID' OR MID = '$UID') or die (mysql_error()); $values = (array_values(mysql_fetch_array($res))); for ($i=; $i = count($values);

[PHP-DB] MSSQL, Linux and Binaries

2003-03-25 Thread Torsten Schulz
Hello, we have stored Images in MS SQL 7 - Database. With freetds we can read all Information - but on Binaries (Images) we became wrong informations. If we store the Data in a File, the Filesize is (as example) 34 kbyte. The original filesize are 17 kbye. what can we do to convert the

[PHP-DB] creating a date array

2003-03-25 Thread David Rice
trying to make an array with every date (in -MM-DD format) of the current week in it... the below code ain't working, any ideas?! cheers, dave function createdatearray($sunday){ $date = date('Ymd',strtotime($date)); for($x=0; $x=7; $x++){ $y = $x + 1;

Re: [PHP-DB] creating a date array

2003-03-25 Thread CPT John W. Holmes
trying to make an array with every date (in -MM-DD format) of the current week in it... the below code ain't working, any ideas?! cheers, dave function createdatearray($sunday){ $date = date('Ymd',strtotime($date)); for($x=0; $x=7; $x++){ $y = $x + 1; $date[$y] =

[PHP-DB] date to Y-M-D

2003-03-25 Thread David Rice
a function to convert any date to ymd... function datetoymd($date){ $dateymd = date('Y-m-d',$date); return $dateymd; } this function when output gives me the date 1970-01-01 (date of the unix timestamp start) so, ehm, why!? cheers, dave

Re: [PHP-DB] date to Y-M-D

2003-03-25 Thread CPT John W. Holmes
function datetoymd($date){ $dateymd = date('Y-m-d',$date); return $dateymd; } this function when output gives me the date 1970-01-01 (date of the unix timestamp start) so, ehm, why!? Because you're not passing a valid Unix timestamp or whatever your passing is empty. ---John Holmes...

RE: [PHP-DB] date to Y-M-D

2003-03-25 Thread Snijders, Mark
ehmmm what kind of dates do you use, maybe dates of birth? when using date of unix timestamp you can't have dates befor 1970 so if those timestamps represents an older date you can't use timestamps! -mark- -Oorspronkelijk bericht- Van: David Rice [mailto:[EMAIL PROTECTED]

[PHP-DB] Table structure

2003-03-25 Thread shaun
Hi, I would be very grateful if someone could look at my table design for me please. The sytem will be used to allow users to log in to a web site and book staff. Here is my design so far. # -- MySQL dump -- # # Table structure for table 'WMS_Allocations' # CREATE TABLE

Re[2]: [PHP-DB] mssql_query ROLLBACK

2003-03-25 Thread Prevít (já)
You can't split a transaction between multiple calls to mssql_query. The memory used (in the server and client) are cleared between each call. You would have to create a batch of statements and execute these with one call to mssql_query. No, I found solution in the end!: SET XACT_ABORT OFF

RE: [PHP-DB] creating a date array

2003-03-25 Thread Boaz Yahav
You also need to give your array a different name so this should work : function createdatearray($sunday){ $date = date('Ymd',strtotime($date)); for($x=0; $x=7; $x++){ $y = $x + 1; $date1[$y] =

[PHP-DB] Empty display loop...

2003-03-25 Thread NIPP, SCOTT V (SBCSI)
I am working on a page that displays a line of information with a checkbox at the end. I began by getting all of the information I wanted displayed working properly and now I am adding the checkbox. Everything is going find with the exception that all of a sudden with the checkbox code

[PHP-DB] Re: Empty display loop...

2003-03-25 Thread Michael Mauch
Scott V Nipp [EMAIL PROTECTED] wrote: I am working on a page that displays a line of information with a checkbox at the end. I began by getting all of the information I wanted displayed working properly and now I am adding the checkbox. Everything is going find with the exception that