Re: [PHP-DB] Date & Time 90 minutes ago

2006-01-19 Thread Cal Evans
$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

Re: [PHP-DB] How can I solve this?

2006-01-18 Thread Cal Evans
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: /

Re: [PHP-DB] problem of transmiting variabl into another page?

2005-12-02 Thread Cal Evans
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; } } ?>

Re: [PHP-DB] how to reuse DB results

2004-05-20 Thread Cal Evans
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

Re: [PHP-DB] SQL Statement

2004-05-18 Thread Cal Evans
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

Re: [PHP-DB] Impact of MySQL Queries

2004-03-11 Thread Cal Evans
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,

Re: [PHP-DB] How to print doc

2004-01-14 Thread Cal Evans
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

Re: [PHP-DB] How to print doc

2004-01-13 Thread Cal Evans
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

Re: [PHP-DB] Saving arrays to databases?

2004-01-12 Thread Cal Evans
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

Re: [PHP-DB] Planetside

2003-12-19 Thread Cal Evans
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

Re: [PHP-DB] mssql and resource handling

2003-12-16 Thread Cal Evans
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

Re: [PHP-DB] nested sets?

2003-11-21 Thread Cal Evans
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

Re: [PHP-DB] Read file

2003-11-17 Thread Cal Evans
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

Re: [PHP-DB] Read file

2003-11-17 Thread Cal Evans
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

Re: [PHP-DB] how to connect to access using ado library

2003-11-13 Thread Cal Evans
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

Re: [PHP-DB] Hyperlinking to a new page

2003-10-09 Thread Cal Evans
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

Re: [PHP-DB] Problem with php/mysql and ISS on windows XPprofeesional

2003-06-03 Thread Cal Evans
= * 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: &

Re: [PHP-DB] Problem with php/mysql and ISS on windows XP profeesional

2003-06-03 Thread Cal Evans
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

Re: [PHP-DB] Can't Insert more than 1 record

2003-04-03 Thread Cal Evans
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

RE: [PHP-DB] too many connections?

2003-01-27 Thread Cal Evans
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

RE: [PHP-DB] print new account name on new account page?

2003-01-18 Thread Cal Evans
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

RE: [PHP-DB] Drawing chart

2003-01-01 Thread Cal Evans
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

RE: [PHP-DB] Next/Prev 10 lines

2002-12-20 Thread Cal Evans
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

RE: [PHP-DB] Theory help needed

2002-12-19 Thread Cal Evans
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

RE: [PHP-DB] Catalog

2002-12-19 Thread Cal Evans
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

RE: [PHP-DB] trees in MySQL

2002-12-19 Thread Cal Evans
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

RE: [PHP-DB] Email Encryption?

2002-11-15 Thread Cal Evans
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

RE: [PHP-DB] Separating content from style

2002-10-09 Thread Cal Evans
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

RE: [PHP-DB] DEALING WITH RETRIEVING AND WRITING DATE VALUE FROM/TO TABLE

2002-10-09 Thread Cal Evans
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

RE: [PHP-DB] Categorized list?

2002-09-27 Thread Cal Evans
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

RE: [PHP-DB] search question

2002-09-17 Thread Cal Evans
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

RE: [PHP-DB] Form question.......

2002-09-05 Thread Cal Evans
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

RE: [PHP-DB] Indepth Tutorial... need help.

2002-09-03 Thread Cal Evans
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

RE: [PHP-DB] SQL query prob

2002-07-17 Thread Cal Evans
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

RE: [PHP-DB] Re: Unified DB Query function

2002-07-01 Thread Cal Evans
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

RE: [PHP-DB] how to create a graph from a db?

2002-06-04 Thread Cal Evans
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

RE: [PHP-DB] Check Boxes

2002-04-29 Thread Cal Evans
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

RE: [PHP-DB] Keeping autoincrement ID 2 digits. Possible?

2002-02-28 Thread Cal Evans
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

RE: [PHP-DB] Multiple rows for one column in a MySQL table?

2001-03-27 Thread Cal Evans
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

RE: [PHP-DB] table 1 to table 2

2001-03-26 Thread Cal Evans
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

RE: [PHP-DB] MySQL for Billng Question

2001-03-26 Thread Cal Evans
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

RE: [PHP-DB] reading a URL...

2001-03-26 Thread Cal Evans
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

RE: [PHP-DB] classes and sessions

2001-03-26 Thread Cal Evans
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

RE: [PHP-DB] different user passwords

2001-03-23 Thread Cal Evans
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

RE: [PHP-DB] delete registers..

2001-03-23 Thread Cal Evans
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

RE: [PHP-DB] Interbase/Apache/Linux

2001-03-23 Thread Cal Evans
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

RE: [PHP-DB] MySQL connection problem - need help from expert

2001-03-22 Thread Cal Evans
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

RE: [PHP-DB] PHP-MySQL create table problem

2001-03-12 Thread Cal Evans
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]

RE: [PHP-DB] help on modifications / subscribe / unsubscribe script

2001-03-10 Thread Cal Evans
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

RE: [PHP-DB] my sql text query

2001-03-09 Thread Cal Evans
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:/

RE: [PHP-DB] array awry

2001-02-27 Thread Cal Evans
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

RE: [PHP-DB] Can you recommend a development tool?

2001-02-08 Thread Cal Evans
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

RE: [PHP-DB] using ID

2001-02-07 Thread Cal Evans
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

RE: [PHP-DB] daisy chaining includes

2001-01-23 Thread Cal Evans
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

RE: [PHP-DB] Wrong kinda dump

2001-01-18 Thread Cal Evans
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

RE: [PHP-DB] Storing images in a database table, should it be done?

2001-01-15 Thread Cal Evans
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

[PHP-DB] Boolean values in MySQL

2001-01-13 Thread Cal Evans
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

RE: [PHP-DB] Newbie Time Fields question

2001-01-13 Thread Cal Evans
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

RE: [PHP-DB] Autonomous Mass Mail List System (Broadcast Email)

2001-01-10 Thread Cal Evans
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

RE: [PHP-DB] sql: LIKE

2001-01-10 Thread Cal Evans
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