On Wednesday 24 November 2004 20:31, Mark Benson wrote:
>> From the above code,
>Actually the above code would result in a parse error. There are no
>where-loops in PHP but there are while-loops. This is not being pedantic. If
>you're going to post code, make sure it's verbatim by using "copy and paste"
>your actual code.
I cannot possibly do this as I am working on a commercially sensitive project
and am instructed by my managing bodies not to quote actual code in case it
contains sensetive data. Sorry if that is not how you like it but that is how I
have to work. I can understand it must be frustrating for experienced members
but alas I'm tied, I try my best...
>You want people to focus on your real problem and not on
>the mistakes you made in transcribing your actual code into your post.
I actually write (rather badly it would seem!) theoretical examples that would
(or in this case wouldn't!!) end in the same situation as the problem in my
code (as I see it).
>> loop 2 returns a blank array, the output is simply
>> "Array ()". If I remove the loop (by commentiung it out) that extracts
>> $crab the mysql $result array is suddenly full of the correct values. It
>> seems to me that loop 1 is destroying or somehow not resetting $result.
>> Very odd...
>mysql_data_seek() is what you need. Or you can consider storing the results
>into an array the first time round then you can read results from the array
>whenever next you need it.
Thanks I'll try that.
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php