[PHP-DB] mysql select last year

2002-12-05 Thread Martin Allan Jensen
Hi all, I have a little problem i know that you can help me with... I have a mysql table +--+ | year | id | + | 2002 | 11 | | 2003 | 11 | | 2004 | 11 | | 2005 | 11 | | 2001 | 12 | | 2002 | 12 | +-+-+ And then i have a loop that takes the year and value

Re: [PHP-DB] Index on email or ID?

2002-12-05 Thread Peter Beckman
Something I used was this: id | username | password | cookie_string $foo = the id was rot13'ed then base64-encoded $str = the cookie_string was an md5 hash generated at the time of registration then a cookie was set: setcookie(cookie_string,$foo.|.$str); When the user returns, we checked for

Re: [PHP-DB] calling function on submit instead of going to a newscript

2002-12-05 Thread Peter Beckman
form action = script.php?f=myfunction OR form action = script.php AND add a input type='hidden' name='f' value='myfunction' if (!empty($_GET['f']) and is_callable($_GET['f'])) { $_GET['f'](); } else { echo No function.; } On Thu, 5 Dec 2002, Gavin Amm wrote: Hi, I'm using some form

[PHP-DB] Parserproblem by cascading outputscript

2002-12-05 Thread Ruprecht Helms
Hi, I've a parserproblem in the attached script. The script should produce dynamicly a diagramm of a familybuilding. In the part for the second generation I get a parsererror and I do not find what is the problem. Regards, Ruprecht -- PHP Database Mailing List (http://www.php.net/) To

Re: [PHP-DB] I got this idea...

2002-12-05 Thread Mark
Another option might be to list out the web sites that have paintball products, and then use google's site: functionality to search fo a product on each site. Store the results in a table or array, and diplay then for the user. So it would work like this: User says find me the MegaBlaster5000.

RE: [PHP-DB] Special URL Verification String... PS

2002-12-05 Thread NIPP, SCOTT V (SBCSI)
Thanks for the responses. I chose to use this method as it appears to be the most simple and effective. For anyone else I am also using the substr function to cut the random string down to something more manageable for the database. Thanks again for the feedback. -Original

Re: [PHP-DB] Parserproblem by cascading outputscript

2002-12-05 Thread Jason Wong
On Thursday 05 December 2002 23:06, Ruprecht Helms wrote: Hi, I've a parserproblem in the attached script. The script should produce dynamicly a diagramm of a familybuilding. In the part for the second generation I get a parsererror and I do not find what is the problem. Get yourself an

[PHP-DB] MSSQL Problems

2002-12-05 Thread Tim Evans
I've written a script that works perfectly for almost ten times, and then stops being able to connect to the MSSQL server. I imagine this has something to do with me not properly closing my connection, and the server having a maximum # of connections. I'm calling both mssql_free_result() and

RE: [PHP-DB] MSSQL Problems

2002-12-05 Thread Griffiths, Daniel
mssql_close() doesnt do anything when you use mssql_pconnect as this is a persistant connection. If you want to close the connection after you've finnished with it you should use mssql_connect() instead. Hope this helps -Original Message- From: Tim Evans [mailto:[EMAIL PROTECTED]] Sent:

[PHP-DB] Newline help...

2002-12-05 Thread NIPP, SCOTT V (SBCSI)
I must be stupid, because I cannot for the life of me figure out why I am not getting newlines from some very simply 'echo' statements. Here is the portion of the code below, and I am getting everything run together on a single line: ?php do { echo $list['id-sys'] . \n; $sys =

Re: [PHP-DB] MSSQL Problems

2002-12-05 Thread John Krewson
mssql_pconnect cannot be closed as you mentioned: http://www.php.he.net/manual/en/function.mssql-pconnect.php I am using this as well, calling MSSQL on a Windows box from PHP/Apache on Linux, and I am also getting some of the results you mentioned, although it behaves differently at different

Re: [PHP-DB] Newline help...

2002-12-05 Thread 1LT John W. Holmes
HTML doesn't render newlines, only BR. Look at your HTML source code and the newlines are there. or, if you're on windows, use \r\n for newlines. ---John Holmes... - Original Message - From: NIPP, SCOTT V (SBCSI) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 05, 2002

RE: [PHP-DB] Newline help...

2002-12-05 Thread NIPP, SCOTT V (SBCSI)
Why does the documentation everywhere seem to imply that you can use the typical newline character? This is most confusing. I seem code examples all over the place using newlines. Oh well, now I know. Thanks. -Original Message- From: 1LT John W. Holmes [mailto:[EMAIL

Re: [PHP-DB] Newline help...

2002-12-05 Thread Ignatius Reilly
If you're on a Window$ system, try \r\n instead of \n Ignatius - Original Message - From: NIPP, SCOTT V (SBCSI) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 05, 2002 5:28 PM Subject: [PHP-DB] Newline help... I must be

Re: [PHP-DB] MSSQL Problems

2002-12-05 Thread Frank M. Kromann
Take a look at the documentation at http://www.php.net/manual/en/function.mssql-close.php whhere it says mssql_close() will not close persistent links generated by mssql_pconnect(). connections created by mssql_pconnect() will only be closed when the PHP process terminates. - Frank I've

[PHP-DB] reversing a date stamp

2002-12-05 Thread mike karthauser
I'm using the below code as the basis for a client updateable news section.. I have variable called date which is set in the db as TIMESTAMP(6). When I print it i get the date in the reverse order YYMMDD. What would be the best way to display it in reverse based on my code below? Thanks.. snip

RE: [PHP-DB] reversing a date stamp

2002-12-05 Thread John W. Holmes
I'm using the below code as the basis for a client updateable news section.. I have variable called date which is set in the db as TIMESTAMP(6). When I print it i get the date in the reverse order YYMMDD. What would be the best way to display it in reverse based on my code below? Just use

RE: [PHP-DB] reversing a date stamp

2002-12-05 Thread Mark
--- John W. Holmes [EMAIL PROTECTED] wrote: I'm using the below code as the basis for a client updateable news section.. I have variable called date which is set in the db as TIMESTAMP(6). When I print it i get the date in the reverse order YYMMDD. What would be the best way to

[PHP-DB] test

2002-12-05 Thread Art Chevalier
test -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] test

2002-12-05 Thread Ignatius Reilly
Test successful. Congratulations. Ignatius You can't trust the Russians. They have no word for 'détente'. - Original Message - From: Art Chevalier [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 05, 2002 8:38 PM Subject:

[PHP-DB] MySQL Array

2002-12-05 Thread Art Chevalier
Hello, I am pulling one column out of a MySQL table in an array. I want to place each element into a HTML table 4 rows across. I am currently doing this with the mysql_fetch_array() function. How can I pull out 4 array elements in one pass through a while loop? Thanks Art Chevalier -- PHP

[PHP-DB] NewB: Return New Record ID...

2002-12-05 Thread Doug Coning
Hi all, How do I do this: I need a PHP page that simply creates a blank record so that I have the record's ID (which is automatically generated). That same page then needs to return the record ID back so that I know what the ID is. I will later allow that record's information to be populated

RE: [PHP-DB] MySQL Array

2002-12-05 Thread Ryan Jameson (USA)
while ($ar = mysql_fetch_array($rs)) echo trtd. $ar['field1']./tdtd.$ar['field2']./td/tr; Make sense? -Original Message- From: Art Chevalier [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 05, 2002 12:44 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] MySQL Array Hello, I am pulling

RE: [PHP-DB] NewB: Return New Record ID...

2002-12-05 Thread Ryan Jameson (USA)
mysql_insert_id if your using mysql ... most other ones you'll have to select max(id) from table after your insert. Ryan -Original Message- From: Doug Coning [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 05, 2002 2:04 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] NewB: Return New

Re: [PHP-DB] MySQL Array

2002-12-05 Thread Art Chevalier
Yes that makes sense, but it is pretty much the same thing I was doing and it's producing the same results. Its basically putting the first element in all 4 table cells. The thing is...I am only selecting from one field. Im trying to get the 4 elements of the column with each pass. So in

RE: [PHP-DB] MySQL Array

2002-12-05 Thread Aaron Wolski
Why don't you post the actual data you are pulling FROM the Db.. then show HOW you want it formatted. Might be better for us to give you a solution or something. Aaron -Original Message- From: Art Chevalier [mailto:[EMAIL PROTECTED]] Sent: December 5, 2002 3:21 PM To: [EMAIL PROTECTED]

Re: [PHP-DB] MySQL Array

2002-12-05 Thread 1LT John W. Holmes
I think he meant that he is only pulling one column, i.e. field1 with each mysql_fetch_array and he wants that in four columns. $c = 1; echo tr; while($ar = mysql_fetch_array($result)) { echo td{$ar['field1']}/td; if(($c % 4) == 0) { echo /trtr; } } You'll have to account for incomplete rows

[PHP-DB] ANNOUNCE: Metastorage object persistence API generator

2002-12-05 Thread Manuel Lemos
Hello, Finally I made time to release a full blown application based on MetaL compiler persistence module. Here is the release announcement that may also be found on the site: http://www.meta-language.net/news-2002-12-05-metastorage.html

[PHP-DB] ANNOUNCE: Metastorage object persistence API generator

2002-12-05 Thread Manuel Lemos
Hello, Finally I made time to release a full blown application based on MetaL compiler persistence module. Here is the release announcement that may also be found on the site: http://www.meta-language.net/news-2002-12-05-metastorage.html

[PHP-DB] Re: [PEAR-DEV] ANNOUNCE: Metastorage object persistence API generator

2002-12-05 Thread Björn Schotte
* Manuel Lemos wrote: Here is the release announcement that may also be found on the site: Where's the PEAR context within the marketing text? -- 35 Kundenportale mit 24.000 Nutzern erstellen. Bei geringen Kosten und einer großen Anzahl an Modulen (DMS, CMS, CRM, Community-Funktionen). Wie

[PHP-DB] Re: [PEAR-DEV] ANNOUNCE: Metastorage object persistence API generator

2002-12-05 Thread Arnaud Limbourg
Where's the PEAR context within the marketing text? Please, don't start any troll/flame war. Arnaud. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] mysql_use_result()

2002-12-05 Thread Qunfeng Dong
Hi, I was trying to do a simple equal join with two tables (one has more than 2,500,000 records; the other one has more than 34,000 records) on indexed attributes. But it took a long time for MySQL to run the join and eventually it returns a error msg Out of memory... needed 8136 bytes). Then I