Re: [PHP-DB] String datetime to DateTime

2002-06-20 Thread Glenn Holden
) to get the bulk of the data out, then regex out the %s string. 2) eregi_replace() Jun with the numeric 3) Dump it as numeric instead of a string month name 4) eregi_replace() the /'s with spaces then sscanf() it. 'Luck -Mike - Original Message - From: Glenn Holden [EMAIL P

[PHP-DB] Re: Can I be an ASP with PHP?

2002-06-20 Thread Glenn Holden
You'll need a table for each web site's connection parameters, but just look them up based on the user and plug them in to your mysql_connect() and mysql_select_db() arguments. As long as their tables match the structure you are expecting everything else should work. Voila! Good luck with your

[PHP-DB] Re: autoincrement

2002-04-02 Thread Glenn Holden
First, I think an AUTO_INCREMENT column must be a numeric column, not TEXT. Second, be sure this column is indexed. If you have trouble, send us the results of a DESCRIBE TABLE `ajj47592`.`content`; statement. That may help us give you some specific syntax to try. Glenn Daniel Broome

[PHP-DB] Re: autoincrement

2002-04-01 Thread Glenn Holden
What's the error? Do you already have an auto-inc field? Have you tried it with another interface? Ie: directly in the MySQL command line util. Glenn Notes from MySQL.com: There can be only one AUTO_INCREMENT column per table, and it must be indexed. When you add an AUTO_INCREMENT column,

[PHP-DB] Re: Contact Database php_mysql

2002-03-26 Thread Glenn Holden
Normalization depends on how the data will be used. For instance in the contacts database you want to enter a name only once. What you have looks fine but it makes an assumption: Each address has only one contact and each contact only one address. I'm not sure why you want City, State and Zip

Re: [PHP-DB] procedures?

2002-03-26 Thread Glenn Holden
From MySQL.com documentation: Our aim is to have stored procedures implemented in MySQL Server 4.1. I think it's in beta but not sure if that feature is implemented now. I'm using stable versions 3.x.x. Glenn Rick Emery [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL

[PHP-DB] How does mysql_fetch_array() work?

2002-03-17 Thread Glenn Holden
In the following example, does the while loop with mysql_fetch_array() query the server each time through the loop? Or does it do everything, while parsing, using $result? Or is there some other subtlety I'm missing? How is this working and where is the work being done? Thanks, Glenn. ?php

[PHP-DB] Re: Which select is fast,thanks....... ?

2002-03-16 Thread Glenn Holden
#1 is the fastest with MySQL. (copied from MySQL online docs...) Glenn a.. COUNT(*) on a single table without a WHERE is retrieved directly from the table information for MyISAM and HEAP tables. This is also done for any NOT NULL expression when used with only one table. . examples of

[PHP-DB] Iterate through the resulting rows of a single column select statement.

2002-03-12 Thread Glenn Holden
I'm looking for a reasonably simple and fast way to fill an array with the results of a single column select query. example results from query: +---+ | productid | +---+ | PS| | PSLEB | | MD1 | | CPSS1 | | CPSG1 | | CPSP1 | | CPSSR | | CPSGR