Re: [PHP-DB] Re: Problem with mysql_fetch_array after first loop...

2005-03-03 Thread Jochem Maas
Steve McGill wrote: Jeffrey Baumgartner [EMAIL PROTECTED] schreef in bericht news:[EMAIL PROTECTED] I've made a little programme that deletes expired records from database tables. The troublesome bit looks like this... $query = SELECT ic FROM ic_ic WHERE date = CURDATE(); $result =

Re: [PHP-DB] suggestions

2005-03-03 Thread Jochem Maas
Mignon Hunter wrote: Hello Mignon, this is really a php-generals question me thinks (you don't even mention a DB ;-), regardless I need to dev a small app and I can think of a couple different ways to handle it but not sure the best way. I need to register those who come to our site that

Re: [PHP-DB] suggestions

2005-03-03 Thread Jochem Maas
Mignon Hunter wrote: Sorry - forgot to mention the data I'm collecting will go into a dbase, that's why I posted here. fine. but your not having trouble putting data into a DB. yet. :-) Thanks I'll work with the session angle. Please see if this logic is flawed... The hyperlink to the pdf will

Re: [PHP-DB] error handling in query execution

2005-03-04 Thread Jochem Maas
Chenri wrote: i have a script that update records with this construct: while( ){ query_string='UPDATE ...'; updateRecord(query_string); } the problem is when there are wrong query_string (such as incorect syntax) can i make sure that the other query, the next one after the

Re: [PHP-DB] GD2 library

2005-03-05 Thread Jochem Maas
Balwant Singh wrote: Sorry I am asking a question which is not directly linked to this forum but i am confident that many of you have the answer for it. is it that much trouble to ask you question in the 'correct forum', there is the php-generals list next door where this question fits perfectly.

Re: [PHP-DB] PHP and JOIN... (I know.. it's easy!)

2005-03-08 Thread Jochem Maas
[EMAIL PROTECTED] wrote: Hi all, long time no post... I've rebuilt a download tracking system my company uses. I built the original, and thought that a restructure would be a doddle! Ooops! ;-) Anyhoo... I used to capture each download in it's own row, replicating user data each time. (Eg: if a

Re: [PHP-DB] PHP and JOIN... (I know.. it's easy!)

2005-03-08 Thread Jochem Maas
[EMAIL PROTECTED] wrote: Cool. cheers for the quick responce... Well, my flatmate is one of two, I live with a lesbian couple in London... One is a falsh guru, sho recently got into PHP (she's a REAL brain box, and picsk stuff up sooo much quick than us mere mortals!) Hard life init ;-) shucks.

Re: [PHP-DB] Random Password problem

2005-03-08 Thread Jochem Maas
J. Connolly wrote: I am using this php in order to create, store and send random passwords to people who want to join my mailing list. ?php function random_password () { $seed = (integer) md5(microtime()); mt_srand($seed); your seeding the randomizer with the value zero each time! the

Re: [PHP-DB] Forms...

2005-03-09 Thread Jochem Maas
Bastien Koert wrote: I use this format input name=right_eye type=checkbox value=1 ? if ($rows['right_eye']==1) { echo CHECKED ; } ?nbsp;Right Eye(s) if your into XHTML: input name=right_eye type=checkbox value=1 checked=checked value=1 / (Bastien already showed how to dynamically determine

Re: [PHP-DB] Merge result set of query?

2005-03-09 Thread Jochem Maas
Martin Norland wrote: ioannes wrote: My first attempt was to use $result=array_merge($result1,$result2) - doesn't work. 'not a valid resource' I have two databases with different connections, so MySQL UNION query would not work. How do I merge the result set of the queries in that case?

Re: [PHP-DB] insertion problem (2)

2005-03-09 Thread Jochem Maas
Stephen Johnson wrote: This may not necessarily be the problem. But I am not sure that you should be capitalizing the first character of your variable. That is a special type of PHP variable - which I do not use normally - so I can not remember what it is called. However, put all your variables

Re: [PHP-DB] Merge result set of query?

2005-03-09 Thread Jochem Maas
Martin Norland wrote: Jochem Maas wrote: Martin Norland wrote: while (($row = mysql_fetch_row($result)) || ($row = mysql_fetch_row($result2))) { // just do it. } .. work (due to shortcircuiting)? and how ugly is it? // foo } That would work if you just wanted to iterate over both

Re: [PHP-DB] Forms...

2005-03-10 Thread Jochem Maas
Neil Smith [MVP, Digital media] wrote: At 07:52 10/03/2005 +, you wrote: Message-ID: [EMAIL PROTECTED] Date: Wed, 09 Mar 2005 20:37:36 +0100 From: Jochem Maas [EMAIL PROTECTED] if your into XHTML: input name=right_eye type=checkbox value=1 checked=checked value=1 / Actually that's invalid

Re: [PHP-DB] Log in multiple users to MySql

2005-03-12 Thread Jochem Maas
Mahmoud Badreddine wrote: I authenticate users of my database with the Apache dialog box. I would like to know where do these values (usernames and passwords) get stored so that I can use this information to log in to the MySql database. its not a DB related question, you should have posted at

Re: [PHP-DB] How to programmatically finding freetds.conf location?

2005-03-12 Thread Jochem Maas
Ashwari Nugraha wrote: Thanks Joseph, I understood about your idea. But it can be more than one freetds.conf found, all I need is finding ones which is used by mssql_connect(). Some people do not delete FreeTDS installation source that is still contain that file. if you know that then you know the

Re: [PHP-DB] ways of making access and visib compat with 4 and 5

2005-03-14 Thread Jochem Maas
tony yau wrote: hi all, I'm trying to make my classes compat with php4 and php5 is there a way of doing something like this: if( version== 4) define( VISIBILITY, ); else if (version==5) define( VISIBILITY, protected ); class Flex { VISIBILITY function CompatFunc(); } this will never

Re: [PHP-DB] Queries close session

2005-03-15 Thread Jochem Maas
Adept-Hosting.Net Administration wrote: I am using the following script to maintain a login session on some pages: ?php session_start(); if(empty($_SESSION['username'])) { die('An error has ocurred. It may be that you have not logged in, or that your session has

Re: [PHP-DB] Transaction over persistent connection problem

2005-04-27 Thread Jochem Maas
Manuel Lemos wrote: Hello, on 04/27/2005 11:49 AM Oskar said the following: Ok. So the idea of splitting one transaction into two steps of a script is wrong? Yes, it is not possible to achive that. What happens is that first access to script is handled by one Web server process or thread and

Re: [PHP-DB] Letters loop

2005-05-26 Thread Jochem Maas
MIGUEL ANTONIO GUIRAO AGUILAR wrote: Hi!! I wanna a do a for loop with letters, Is this possible? for ($i = 'A'; $i = 'Z'; $i++){ // code } try it. php -r ' for ($i = a; $i z; $i++){ echo $i,.; } echo z;' -- MIGUEL GUIRAO AGUILERA Logistica R8 - Telcel Tel:

Re: [PHP-DB] how do i fetch some text

2005-05-31 Thread Jochem Maas
chintan wrote: how do i fetch some text from a webpage for some generated field? like i want to fetch a score line from a sport site in which the line says score? actually i want to fetch an IP from my ISP's page which displays it with my user name. where is the DB in this question?

Re: [PHP-DB] Long running db queries and the STOP button

2005-10-27 Thread Jochem Maas
Bastien Koert wrote: Few things I can think of: 1. warn the user that the query may take some time and then show a splash type screen that indicates that something is happening 2. Run the whole thing in a new window without the toolbar 3. rework the query so it doesn't take so much time. If

Re: [PHP-DB] Long running db queries and the STOP button

2005-10-28 Thread Jochem Maas
[EMAIL PROTECTED] wrote: Hi Jochem, Thanks for replying I just had the idea (never tried it myself) that you could possibly fork the request process and let the child process perform the query It makes perfectly sense to us, but it seems it is only possible to fork (pcntl_fork) with php

Re: [PHP-DB] Long running db queries and the STOP button

2005-11-01 Thread Jochem Maas
[EMAIL PROTECTED] wrote: Hi Jochem, if you are using apache then virtual() might offer a solution? (just guessing) Cool, I didn't know of that one. But it seems that is just calls back into apache, i.e. it doesn't generate a second independent thread. This would have been too good to be

<    1   2