$date_90_minutes_ago = date('m/d/Y',mktime()-(60*90));
$time_90_minutes_ago = date('h:i:s',mktime()-(60*90));
60 seconds * 90 minutes.
=C=
|
| Cal Evans
| http://www.calevans.com
|
| We get our best customers from referrals.
| We would appreciate you referring any of your
| f
try
$x =pathinfo($_SERVER['PHP_SELF']);
echo $x['dirname'];
=C=
|
| Cal Evans
| http://blog.calevans.com
|
|
Chris Payne wrote:
Hi everyone,
I am using PHP_SELF in order to get the current path on a dynamically
created webpage. This gives me the following:
/
are you having other problems?
=C=
|
| Cal Evans
| http://www.calevans.com
|
Mohamed Yusuf wrote:
I am transmitting variable from one of my pages and I would like to match
that variable into mysql data. it won't return data.
my code is this.
$j |";
if ($j == Z) {
break;
}
} ?>
adodb has a moveFirst() function. You should be able to use it to
display x rows then $rs->moveFirst() and then use a while loop to
display all of them.
HTH,
=C=
:
: Cal Evans
: Evans Internet Construction Company
: 615-260-3385
: http://www.eicc.com
: Building web sites that build y
mercial tools costing $4k+ then you'll feel right at home with
this. (It's my understanding that MySQL has purchased this project, but
I may have my story wrong.)
Finally, you've already found the greatest tool for debugging MySQL/php,
the lists.
See ya round.
=C=
:
: Cal Evan
essor will be more available for mysql and
your web server.
4: Make sure you have the proper indexes set. If you do need 20 queries,
20 fast queries are better than 20 slow queries. :)
HTH.
Let me know how I may be of service,
=C=
* Cal Evans
* http://www.eicc.com
* We take care of your IT,
Agreed. It is possible to print things on the server side. I made the
(incorrect) assumption that he wanted to control client-side printing
from PHP.
Let me know how I may be of service,
=C=
* Cal Evans
* http://www.eicc.com
* We take care of your IT,
* So you can take care of your business
Assuming you mean from PHP, you can't directly do that. PHP is server
side, Printing is client side. If you are working in a browser
environment, you can explore your options within Javascript.
Let me know how I may be of service,
=C=
* Cal Evans
* http://www.eicc.com
* We take care of yo
ld go that route, I would re-exaim your
datamodel and see if tere wasn't a way to properly store it.
Let me know how I may be of service,
=C=
* Cal Evans
* http://www.eicc.com
* We take care of your IT,
* So you can take care of your business.
*
* I think inside the sphere.
Jeroen Wastee
What is the Planetside database?
Let me know how I may be of service,
=C=
* Cal Evans
* http://www.eicc.com
* We take care of your IT,
* So you can take care of your business.
*
* I think inside the sphere.
Madaleno wrote:
Hi, can someone help me on how to access Planetside database to get some
hrough the entire recordset and store the records as an array. The
array you can save in your session. note if your record set is more than
100 records I would not do this.
Let me know how I may be of service,
=C=
* Cal Evans
* http://www.eicc.com
* We take care of your IT,
* So you can take ca
how I may be of service,
=C=
* Cal Evans
* http://www.eicc.com
* We take care of your IT,
* So you can take care of your business.
*
* I think inside the sphere.
ma wrote:
hi everybody!
i try to make a clickable menu. it should be outputed as XML. i found a
solution to make it possible to decend onl
ow to fetch records from the database and return them to the
currently running page without refreshing the page. (It can be done.
It's ugly and it's a bugger to maintain, but it can be done.)
Let me know how I may be of service,
=C=
* Cal Evans
* http://www.eicc.com
* We take care of yo
lse.
>
This requires lib-dilithium.so.6 and it's currently only in the devel
branch. (So I wouldn't run it in a production environment.)
Let me know how I may be of service,
=C=
* Cal Evans
* http://www.eicc.com
* We take care of your IT,
* So you can take care of your business.
*
* I
checkout http://php.weblogs.com/ They have a database abstraction layer
that works like ADO. It may do what you want.
Let me know how I may be of service,
=C=
* Cal Evans
* http://www.eicc.com
* We take care of your IT,
* So you can take care of your business.
*
* I think inside the sphere
example. You can also use
$_GET['city'] but I use $_REQUEST because it contains both $_POST and $_GET.
The variable names are case sensitive and must be exactly what you put
on the URL.
$_REQUEST['City'] != $_REQUEST['city']
HTH,
=C=
* Cal Evans
* http://www.eicc.c
=
* Cal Evans
* http://www.christianperformer.com
* Stay plugged into your audience
* The measure of a programmer is not the number of lines of code he writes
but the number of lines he does not have to write.
*
- Original Message -
From: "Adam Voigt" <[EMAIL PROTECTED]>
To: &
Sounds like you left off a $ when using a variable. I would take a look at
line 158, find the variable name and make sure it's $name. Disabling the
error will cause the message to go away but not fix the problem.
humbly,
=C=
* Cal Evans
* http://www.christianperformer.com
* Stay plugged
HAR!
Ok, seriously though, does your script return an error of any kind? Sounds
like you are violating a primary or unique key in the second insert.
What database engine are you using?
=C=
- Original Message -
From: "Leif K-Brooks" <[EMAIL PROTECTED]>
To: "Keven Jones" <[EMAIL PROTECTED
What database are you using for your server? What OS is it running on? I've
run into this on MSSQL before but never on MySql.
=C=
p.s. Hi from Antioch!
*
* Cal Evans
* Stay plugged into your audience.
* http://www.christianperformer.com
*
-Original Message-
From: Addison
e on your SQL
server to make sure that the select is being executed properly.
=C=
*
* Cal Evans
* Stay plugged into your audience.
* http://www.christianperformer.com
*
-Original Message-
From: Addison Ellis [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 18, 2003 1:58 PM
To: [EMAI
check
www.zend.com
www.freshmeat.net
http://www.planetsourcecode.com/vb/default.asp?lngWId=8
to start with.
*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*
-Original Message-
From: Matthias Steiner [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 01, 2003 5:28 PM
To
check out php.weblogs.com
ADODB does this for you.
=C=
*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*
-Original Message-
From: Steve Dodkins [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 9:16 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Next/Prev 10 lines
Has
Read today's thread about trees. It contains the info you need.
=C=
*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*
-Original Message-
From: Chris Payne [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 19, 2002 10:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] T
starter project.
Oh, and don't forget Paul Dubois book on MySQL. I've not yet purchased a
copy (sorry Paul) but the parts I've leafed through at the bookstore looked
very good.
Also, join the MySQL mailing list. (Paul actually hangs out over there)
=C=
*
* Cal Evans
* T
like one of the suggestions I read here, this system doesn't like holes in
the numbers. But he gives code for adding and subtracting nodes. By
combining the two, I actually made it so the client could move entire
branches.
HTH,
=C=
*
* Cal Evans
* The Virtual CIO
* http://www
Instead of emailing them the login and password info, setup a fax gateway
and fax it to them. I used this in a situation that needed to be HIPA
compliant.
(If security is still an issue, fold the fax before sending it.) :)
HTH,
=C=
*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
ve come up
with.
=C=
*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*
-Original Message-
From: Dave Smith [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 09, 2002 10:27 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Separating content from style
Folks,
I've just learned a bit
uot;;
$rs = mysql_query($sql);
// writing to a date field
$sql = "update myTable set myDateField='2002-10-09' where myTableID=5;";
$rs = mysql_query($sql);
HTH,
=C=
*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*
-Original Message-
From: Robert Leahong [ma
eing
said, read chapter 28 and then 29. If you do this, at the end of chapter 29
he gives you a (relatively) simply way to accomplish what you want to do.
I've used it now for menu trees and user trees and it's working great.
HTH,
=C=
*
* Cal Evans
* The Virtual CIO
* http://ww
word.
HTH,
=C=
*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*
-Original Message-
From: Meltem Demirkus [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 17, 2002 3:20 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] search question
Hi,
Is there any other efficient way (--except
user will see a small window pop-up.
Other than that, it is possible to use a Java Applet to do it as well.
HTH,
=C=
*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*
-Original Message-
From: Rodrigo [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 04, 2002 7:30 PM
To: P
I must concur, Chapters 28 & 29 are worth the price of the book!
=C=
*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*
-Original Message-
From: Ignatius Reilly [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 9:49 AM
To: [EMAIL PROTECTED]; Matt Zur
Subject
ctType'];
} // if ($lastContactType != $row['contactType'])
When contactType changes again, you'll display it again and reset the flag
again.
HTH,
=C=
*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*
-Original Message-
From: Russ [mailto:[EMAIL PROTEC
Casy,
try php.weblogs.com ADODB. It is a database abstraction layer that supports
Sybase. (Among other db backends.)
HTH,
=C=
*
* Cal Evans
* Journeyman Programmer
* Techno-Mage
* http://www.calevans.com
*
-Original Message-
From: Casey Allen Shobe [mailto:[EMAIL PROTECTED]]
Sent
never done it myself but look into the png/jpg routines built into PHP. You
can use them to dynamically create an image. What you DO with the image is
up to you. :)
Seriously, there are some tutorials out there about this very topic. hit
phpbuilder.com or google.com to find them.
=C=
*
* Cal
I usually store the value as a 0 (unchecked) or a 1(checked) in a char(1)
field. Then, in populating the form my input has something like There are other ways of doing it. (Warning,
I'm not actually LOOKING at my code at the moment so YMMV.)
HTH,
=C=
*
* Cal Evans
* Journeyman Progr
Not within the construct of auto_increment. You could , however write your
own Serial Assigned Key (SAK) routine in PHP to enforce these business
rules.
=C=
*
* Cal Evans
* Journeyman Programmer
* Techno-Mage
* http://www.calevans.com
*
-Original Message-
From: Andy [mailto:[EMAIL
No. You need to look at normalizing your database if you have this
situation.
Cal
http://www.calevans.com
-Original Message-
From: Kevin Connolly [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 27, 2001 10:48 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Multiple rows for one column in a M
insert into table2 Select * from table1 where myConditionIsMet;
Cal
http://www.calevans.com
-Original Message-
From: Tobe Johnson [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 26, 2001 1:41 PM
To: PHP-DB
Subject: [PHP-DB] table 1 to table 2
Using PHP, I need to run a query against o
Jeff,
Check www.freshmeat.net There are a couple of packages out there that
already do this. Some of them use MySQL. If nothing else, you can borrow
their database schema.
Cal
http://www.calevans.com
-Original Message-
From: Jeff Oien [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 26
Try:
$sqlStatement = "Select * from newStories where id =
".$GLOBALS['HTTP_GET_VARS']['id']. " order by whateverValue";
Then execute that statement.
The value ID that you passed in on the URL is stored in the associative
array $HTTP_GET_VARS. Check the manual at www.php.net, there's a section o
Yes.
You can create your class, instantiate it and store it in the session like
any other variable. However. before you issue a Session_start() you MUST
have already included the class definition in your page. If you start the
session and have not, it will throw an error because it will not k
same user, different passwords? Not sure you can. If you have to do this
then I would issue a different account for each user/database combo you
have. (i.e. _cal) and give each account a separate password.
Why do you want to do this? You can control access for an account on a
database level. T
Depends on what registers are. If they are people then I would just shoot
then and get it over with. :)
Seriously, if you mean how do you delete records form a table that are more
than a month old (let's say 30 days to make it simply) then you need to have
a timestamp field in your table. Then
Todd,
I don't believe that there is an all-in-one compile that you can install,
but you can certainly install Interbase, Apache and PHP on Linux and compile
them yourself and make them work. Alternately, I'm sure there are 100 or so
people on this list whom you could hire to get it up and running
Greetings and Salutations Ian,
Somewhere in your code you are going to have a line similar to this:
$currentConnection = mysql_connect ($server, $userName,$password)
$server is going to be either the name or the IP address of your server
$userName is going to be the MySQL user name you use to co
Maybe it's just me but I've never seen anyone create a table by using a
Select statement. Have you verified that you can do this? (like you've
checked the manual and this construct is supported?)
Cal
http://www.calevans.com
-Original Message-
From: Ivo Stoykov [mailto:[EMAIL PROTECTED]
I'll take the easy one...
#3: instead of:
use
Cal
http://www.calevans.com
-Original Message-
From: Marc Bragg [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 10, 2001 11:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] help on modifications / subscribe / unsubscribe script
Am using t
Nope, you change the field to not null then it won't allow null values in
the database. Since the data already has null values, the Alter Table would
probably fail.
I'm still trying to figure out what any of this has to do with an index? Do
you have an index on this description field?
Cal
http:/
Hi Keith,
1: Don't cross-post. It's rude. Especially since this has nothing to do with
MySQL.
2: You are not building a multi-dimensional array. The code below won't even
build a single dimensional array because you didn't put your keys in quotes
so it's probably blowing chunks. At the very leas
Hi John
1: get all the relevant O'Reilley books on PHP and the DB you will be using.
2: Grab the 30 day eval of Homesite from www.allaire.com (my personal fav
HTML editor)
3: Forget trying to do WYSIWYG HTML development. You will get a better
product and if you take the time to teach your develo
Ohh, Ohh, OOHH! [waving hand wildly in the air] :)
Because primary key should always be system generated and not a value that
the user ever sees, can modify, or that means anything to anyone other than
the system.
usernames can change. PK's should never change.
In this case, if use
I have a single include file that I put all my require_once commands in that
are applicable to each page.
Something like
then at the top of each page I put:
require_once("myincludes.php");
is that what you are looking for?
Cal
http://www.calevans.com
-Original Message-
From: John St
FWIW, I get a core dump anytime I use -d try --database=
Cal
http://www.calevans.com
-Original Message-
From: Lynn Siprelle [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 18, 2001 1:01 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Wrong kinda dump
I feel like saying "Nothin' up my s
Generically speaking, when faced with the option of putting graphics in a
Blob field or putting a pointer to them and storing them on the file system,
I have always chosen to store a pointer in the database and store the image
on the file system.
Cal
http://www.calevans.com
-Original Messag
Question to those of you using MySQL.
What is the accepted practice for storing boolean values? Do you use a
tinyInt 0=false 1=true or an enum("T","F")? Or is there another way I'm not
seeing?
Cal
*
* Professional Nerd Herder
* http://www.calevans.com
*
--
PHP Database Mailing List (http://w
IMHO,(And I'm sure there are those on this list that would disagree with
me.)
Store the time of each track in seconds in the database. (i.e. an int,
instead of 2:37 it would be 157) then convert to minutes and second for
display.
Cal
http://www.calevans.com
-Original Message-
From: Timo
Don't reinvent the wheel. It will take you longer to write it than it will
to learn to admin majordomo or any of 10 other programs like it.
IMHO,
Cal
-Original Message-
From: Jason Beebe [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 10, 2001 7:49 PM
To: [EMAIL PROTECTED]; [EMAIL PR
Need to see the entire Select statement.
Cal
http://www.calevans.com
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 10, 2001 4:19 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] sql: LIKE
Hi there. Is there a way to sort results of a '.. WHERE
60 matches
Mail list logo