I have sunset times stored in a database and the a PHP page that performs a
number of calculations on the retrieved time. One of the things I need to
figure out is whether or not to add an hour for Daylight Savings Time.
Since there is more than once location, and each one begins and ends DST
Why not abandon local time altogether and have all time in UTC. Saves
confusion of different local time zones, and as an added bonus, UTC does
not observe summer time (daylight savings time if you are American)
On Sun, 17 Aug 2003 09:43:54 +0200, Lisi wrote:
I have sunset times stored in a
hi ya'll
I am having a nightmare on this issue of mine.
I've got this array that I need to write to a file...
sample code below
while (something);
{
query data base
$r_ul=ifx_fetch_row($sideQuery4);
$type1 = array($rotation.\n);
switch ($r_ul['number'])
{
case '4';
First, are you sure there is data in $my_array?
Add this after you set the array:
echo pre.print_r($my_array)./pre;
You'll need to loop through the array , writing each line in the file at
a time.
Something like:
//open the file stuff here
foreach ($my_array AS $values)
{
fputs($fp,
This may or may not make sense for your issue. but if you have the whole
array in memory you can serialize() it and write the string that the
function returns to the file.
$fp = fopen(yourfilename.txt, w);
$my_array_s = serialize($my_array);
if (isset($fp)) {
fwrite($fp, $my_array_s);
}
Good point and nice find, Jeff!
I wasn't sure where he was going with the data.. was he trying to save
the actual array, intact, for say a chaching exercise or did he want to
insert the contents of that array into a file?
Could go either way I suppose :)
Aaron
P.S. Working on a Sunday too?
Hey guys thanks a lot
your method worked perfect Aaron, thanks
and that serialize() function, hummm i got to go do some reading and
testing.
thanks for enlightenment and the assistance guys.
RedHat.OpenSource.bz
- Original Message -
From: Aaron Wolski [EMAIL PROTECTED]
To: [EMAIL
Hey,
That's what we're here for :)
As for serialize? It's a great function if you need to preserve an array
in its original form.
Useful for sending back and forth between pages in the URL. Though, I'd
never use on an open URL for the general public. Maybe in an
Administration system not seen
I'm not making two connections, I'm making one and only one call to
mysql_connect. Also, there is no way in that function as per the definition
page of it (http://us3.php.net/mysql_connect) to have the database selected
as per your example below.
With my connection though, when I do:
$dbh =
Try using the SQL to select which database.
example, instead of:
select * from table1
use:
select * from database1.table1
if that works, and the php command doesn't that may mean the the mysql client
lib is broken, although, I've been using it with mysql 4 and it seems to work
fine.
Please ignore, this is a test
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
I am trying to execute a stored procedure in PHP via mssql_query ()
function. I pass 8 parameters to it.
The query runs fine in SQL Query Analyzer but when I run it thru PHP, it
behaves strangely. I can get number of rows (mssql_num_rows()) and number of
fields (mssql_num_fields()) in PHP,
Hello all, I have this page where I search and add up commissions in a
mysql database. I want to select commissions between a certain date
range.
This is what im currently using but it does not seem to work.
$from=20030101;
$to=20031230;
$search=mysql_query(SELECT SUM(amount) FROM
Wendell Frohwein wrote:
Hello all, I have this page where I search and add up commissions in a
mysql database. I want to select commissions between a certain date
range.
This is what im currently using but it does not seem to work.
$from=20030101;
$to=20031230;
$search=mysql_query(SELECT
hav u tried using dashes to denote which portion is the year, month, or
day ?
e.g. instead of 20030101, you'd probably want to use 2003-01-01.
Wendell Frohwein wrote:
Hello all, I have this page where I search and add up commissions in a
mysql database. I want to select commissions between a
Hi there everyone,
I'm re-writing the messageboard that my boss uses, and I wanted to know if there's a
cleaner way to do the below code. The first bit gets the name of the forum by the ID
sent from the previous page to display the forum name, then the second bit gets some
of the info for the
16 matches
Mail list logo