[PHP-DB] Array Display

2008-05-06 Thread A. Joseph
Please i knew this not the best place to post this message but i ain`t gat no option i need fast help on this I have a Array and data are grouped according to level, so want to display everybody on same level in same HTML row os if you are on level 0 then you first, to the next people on level one

[PHP-DB] Array Display

2008-05-06 Thread A. Joseph
Please i knew this not the best place to post this message but i ain`t gat no option i need fast help on this I have a Array and data are grouped according to level, so want to display everybody on same level in same HTML row os if you are on level 0 then you first, to the next people on level one

Re: [PHP-DB] array issue

2007-11-27 Thread Jason Gerfen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Clare Media wrote: > Guys really in need of some assistance here. > > I am reading an xml file and want to loop through the entire file and > display the information. > > Unfortunately I am only showing 1 item. how can I go about showing all news > i

[PHP-DB] array issue

2007-11-27 Thread Clare Media
Guys really in need of some assistance here. I am reading an xml file and want to loop through the entire file and display the information. Unfortunately I am only showing 1 item. how can I go about showing all news item? I've tried array and loop however I am not versed with any of them. Thank

RE: [PHP-DB] array

2007-03-29 Thread Bastien Koert
To: "php-db@lists.php.net" Subject: [PHP-DB] array Date: Thu, 29 Mar 2007 13:29:45 -0700 (PDT) Hi all, I want to put result of query in a two dimensional array like this: title[0]=x description [0]=y title[1]=z description [1]=w . any idea would be apprec

[PHP-DB] array

2007-03-29 Thread elk dolk
Hi all, I want to put result of query in a two dimensional array like this: title[0]=x description [0]=y title[1]=z description [1]=w . any idea would be appreciated $query = "SELECT * FROM photo"; $result=mysql_query($query); while ($row = mysql_fetch_array($re

Re: [PHP-DB] array field type

2007-03-06 Thread Mark
Sancar Saran wrote: > Thanks for all those replies. It seems there was no easy solution (and or > serializing was better solution) for us. > > Our arrays contains lots of things.. XML may not fit because content of > array may broke xml structure. > Before you give up, take a look at the XMLDBX

Re: [PHP-DB] array field type

2007-03-06 Thread Micah Stevens
Wrong! Take a look at the SET datatype http://dev.mysql.com/doc/refman/4.1/en/set.html. This allows you to have an array of values in a single field, and the user can select any number of them. Sort of, but not really: This is a really specialized keyword, and depends on binary mapping o

Re: [PHP-DB] array field type

2007-03-06 Thread Tony Marston
"Sancar Saran" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sunday 04 March 2007 23:04, Sancar Saran wrote: >> Hi, >> >> I want to know is there any db server around there for store php arrays >> natively. >> >> Regards >> >> Sancar > Thanks for responses, it seems I have to g

Re: [PHP-DB] array field type

2007-03-05 Thread Sancar Saran
Thanks for all those replies. It seems there was no easy solution (and or serializing was better solution) for us. Our arrays contains lots of things.. XML may not fit because content of array may broke xml structure. Thanks for help. Regards Sancar. > >>>Hi, > >>> > >>>I want to know is th

Re: [PHP-DB] array field type

2007-03-05 Thread Bastien Koert
CTED]> CC: php-db@lists.php.net, php-general@lists.php.net Subject: Re: [PHP-DB] array field type Date: Sun, 04 Mar 2007 15:04:42 -0800 Not a single field, but there's several methods of storing trees of information, which is what an array is. Here's one: Nested Array storag

Re: [PHP-DB] array field type

2007-03-04 Thread Micah Stevens
Not a single field, but there's several methods of storing trees of information, which is what an array is. Here's one: Nested Array storage table: ArrayID (int, autonumber) keyname (text) parent (int) data (bigtext or whatever would be appropriate for the data you're storing) For an array l

Re: [PHP-DB] array field type

2007-03-04 Thread Sancar Saran
On Sunday 04 March 2007 23:04, Sancar Saran wrote: > Hi, > > I want to know is there any db server around there for store php arrays > natively. > > Regards > > Sancar Thanks for responses, it seems I have to give more info about situation. In my current project, we had tons of arrays. They are ve

[PHP-DB] array field type

2007-03-04 Thread Sancar Saran
Hi, I want to know is there any db server around there for store php arrays natively. Regards Sancar -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Array

2006-09-29 Thread Shaun A Riches
Title: RE: [PHP-DB] Array This is hardly database related but nonetheless. $myString = "Check one two three four.  You did well to count to four."; $myString = str_replace(".","",$myString); $myString = strtolower($myString); $myWords = explode(" ",

RE: [PHP-DB] Array

2006-09-29 Thread Hutchins, Richard
s or classes if you Google for them. -Original Message- From: Ron Piggott (PHP) [mailto:[EMAIL PROTECTED] Sent: Friday, September 29, 2006 11:21 AM To: PHP DB Subject: [PHP-DB] Array If I have the sentences Check one two three four. You did well to count to four. how do I put each wor

Re: [PHP-DB] Array

2006-09-29 Thread Niel Archer
Hi Ron, > how do I put each word into an array (so there would be 12 components in > the array) as well as remove the period and make the C in Check and the > Y in You lower case This isn't a DB question, please ask questions in the appropriate list. But for reference, look up the str_replace, s

[PHP-DB] Array

2006-09-29 Thread Ron Piggott (PHP)
If I have the sentences Check one two three four. You did well to count to four. how do I put each word into an array (so there would be 12 components in the array) as well as remove the period and make the C in Check and the Y in You lower case Ron

RE: [PHP-DB] Array problem...

2005-09-18 Thread Bastien Koert
Dunno if its relevant, but the recommended way to use sessions is to assign stuff to a $_SESSION['varname']...I don't really see anything wrong with the code... Also, what arrays are causing the problems? bastien From: "NIPP, SCOTT V (SBCSI)" <[EMAIL PROTE

[PHP-DB] Array problem...

2005-09-16 Thread NIPP, SCOTT V \(SBCSI\)
I am migrating a web app from an old server running PHP 4.2.3 to a new server running 4.3.8. The problem I am running into at the moment is building an array and passing it to another page. This code works fine on the old server, but the array is not coming across to the new page on the n

[PHP-DB] array messing up

2004-11-19 Thread Rainer Bendig aka Ny
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, i don't know if this is the right list to post it, or php-general... I am posting here because i think its database related. so here we go: I want to build an array containing two arrays $navm[] and $navs[], $navs[] should go to $navm[items]. I

Re: [PHP-DB] Array and insert statement throws error

2004-10-15 Thread Stuart Felenstein
Hopefully these functions will explain it. I'm starting the transaction, then provided it takes with no errors it gets the commit function begin() { mysql_query("BEGIN"); } function commit() { mysql_query("COMMIT"); } function rollback() { mysql_query("ROLLBACK"); } begin(); $query = "INSERT INTO

Re: [PHP-DB] Array and insert statement throws error

2004-10-15 Thread Brent Baisley
When are you actually performing the insert into the database? The code you posted is only changing the value of the variable $query. You also need to have the database function to insert into the database. Assuming it MySQL: ... foreach(...) { $query = "INSERT INTO ..."; mysql_query($query);

Re: [PHP-DB] Array and insert statement throws error

2004-10-15 Thread Stuart Felenstein
Actually it did just loop. I need to test again. The insert statement is the the one $query = So it's after yes, but contained in the braces, like you diagram below. Stuart --- "Matt M." <[EMAIL PROTECTED]> wrote: > where is your insert statement? I am guessing it is > after your loop > >

Re: [PHP-DB] Array and insert statement throws error

2004-10-15 Thread Matt M.
where is your insert statement? I am guessing it is after your loop if ( is_array( $_SESSION['l_industry'] ) ) { foreach ( $_SESSION['l_industry'] as $p ) { $query = "INSERT INTO Profiles_Industries (ProfileID,IndID) VALUES ($LID, $p)"; /This is where y

Re: [PHP-DB] Array and insert statement throws error

2004-10-15 Thread Stuart Felenstein
Yep, I had found it shortly before. Only it's not looping. It is taking last value only. Stuart --- "Matt M." <[EMAIL PROTECTED]> wrote: > if ( is_array( $_SESSION['l_industry'] ) ) { > foreach ( $_SESSION['l_industry'] as $p ) { > $query = "INSERT INTO Profiles_Industries

Re: [PHP-DB] Array and insert statement throws error

2004-10-15 Thread Matt M.
if ( is_array( $_SESSION['l_industry'] ) ) { foreach ( $_SESSION['l_industry'] as $p ) { $query = "INSERT INTO Profiles_Industries (ProfileID,IndID) VALUES ($LID, $p)"; } //foreach ( $_SESSION['l_industry'] as $p ) } //if ( is_array( $_SESSION['l_industry'] ) ) --

Re: [PHP-DB] Array and insert statement throws error

2004-10-15 Thread Stuart Felenstein
Where would that go? Stuart --- "Matt M." <[EMAIL PROTECTED]> wrote: > > if ( is_array( $_SESSION['l_industry'] ) ) { > > foreach ( $_SESSION['l_industry'] as $p ) > { > > $query = "INSERT INTO Profiles_Industries > (ProfileID, > > IndID) > > VALUES ($LID, $p)"; > > } > > do you have a

Re: [PHP-DB] Array and insert statement throws error

2004-10-15 Thread Matt M.
> if ( is_array( $_SESSION['l_industry'] ) ) { > foreach ( $_SESSION['l_industry'] as $p ) { > $query = "INSERT INTO Profiles_Industries (ProfileID, > IndID) > VALUES ($LID, $p)"; > } do you have a } for the if statement? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,

[PHP-DB] Array and insert statement throws error

2004-10-15 Thread Stuart Felenstein
Trying to get array of values into table. Each value will be part of a new record, so it's a loop. I am getting a parse error though and for further down in the code though I know this is what's causing it. Is there anything wrong with this statement ? if ( is_array( $_SESSION['l_industry'] ) )

Re: [PHP-DB] Array

2004-08-26 Thread Micah Stevens
Since you provided no value's it's a little tough, but the general for would be: $parts = array( array("PN" => $row1col1, "Desc" => $row1col2, "Qty" => $row1col3), array("PN" => $row2col1, "Desc" => $row2col2, "Qty" => $row2col3) ); Depending on your implimentation, it maybe easier to use s

Re: [PHP-DB] Array

2004-08-26 Thread Justin Patrin
$arr = array('key' => array('key2' => 'value', 'key3' => 'value', ...), ...); $arr['key2'] = array('key2' => 'value', ...); $arr['key3]['key2'] = 'value'; On Thu, 26 Aug 2004 16:11:27 -0500, Miguel Guirao <[EMAIL PROTECTED]> wrote: > Hi!! > > I have a table with many options from when the user

[PHP-DB] Array

2004-08-26 Thread 'Miguel Guirao'
Hi!! I have a table with many options from when the user can select them, after that, his/her selections will be stored in a database. In the mean time, I want to store his/her selections in an array like this one: PN DescQty |

[PHP-DB] array months

2004-02-25 Thread peppe
Hi I realy need help hier I have a aaray of months $lang['months'] = array ( 1 => "Januari", 2 => "Februari", 3 => "Maart", 4 => "April", 5 => "Mei", 6 => "Juni", 7 => "Juli", 8 => "Augustus", 9 => "September", 10 => "Oktober", 11 => "November", 12 => "December" ); and a function function showMonth

Re: [PHP-DB] Array sorting question...

2004-01-23 Thread Kelly Hallman
On Fri, 23 Jan 2004, NIPP, SCOTT V (SBCSI) wrote: > I am trying to populate an array from a MySQL database. I think I > have the code correct to populate the array, but I need to somehow sort the > array eliminating duplicate values. I think I can loop through the array > doing a compariso

RE: [PHP-DB] Array sorting question...

2004-01-23 Thread Katie Evans-Young
NIPP, SCOTT V (SBCSI) wrote: > I am trying to populate an array from a MySQL database. I think I > have the code correct to populate the array, but I need to somehow > sort the array eliminating duplicate values. I think I can loop > through the array doing a comparison and building a new a

[PHP-DB] Array sorting question...

2004-01-23 Thread NIPP, SCOTT V (SBCSI)
I am trying to populate an array from a MySQL database. I think I have the code correct to populate the array, but I need to somehow sort the array eliminating duplicate values. I think I can loop through the array doing a comparison and building a new array by discarding the value if it

Re: [PHP-DB] array

2003-12-11 Thread peppe
gt; Sent: 11 December 2003 16:07 > To: [EMAIL PROTECTED] > Subject: [PHP-DB] array > > > Hi > I have a variable cold $access and there are values 1,2,3,4,5 > How can I check for example > If ($access =='2'){ > echo "go further"; > } > How can I make t

RE: [PHP-DB] array

2003-12-11 Thread brettking
To: [EMAIL PROTECTED] Subject: [PHP-DB] array Hi I have a variable cold $access and there are values 1,2,3,4,5 How can I check for example If ($access =='2'){ echo "go further"; } How can I make this work Thanx in advance -- PHP Database Mailing List (http://www.php.net/) To u

[PHP-DB] array

2003-12-11 Thread peppe
Hi I have a variable cold $access and there are values 1,2,3,4,5 How can I check for example If ($access =='2'){ echo "go further"; } How can I make this work Thanx in advance -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Array question

2003-11-25 Thread CPT John W. Holmes
From: "ShortStay" <[EMAIL PROTECTED]> > How do you delete a value and key from an array? I know the value. You need to know the key. unset($Array[$key]); There are various array functions that'll find the key for you if you know the value. > Is it OK to post array questions to the db list? N

[PHP-DB] Array question

2003-11-25 Thread ShortStay
How do you delete a value and key from an array? I know the value. Is it OK to post array questions to the db list? John -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] array issue

2003-08-17 Thread Aaron Wolski
tion system not seen by many users. Aaron > -Original Message- > From: OpenSource [mailto:[EMAIL PROTECTED] > Sent: August 17, 2003 12:28 PM > To: Aaron Wolski > Cc: PHP-DB; [EMAIL PROTECTED] > Subject: Re: [PHP-DB] array issue > Importance: High > > Hey guys

Re: [PHP-DB] array issue

2003-08-17 Thread OpenSource
> To: <[EMAIL PROTECTED]> Cc: "'PHP-DB'" <[EMAIL PROTECTED]>; "'OpenSource'" <[EMAIL PROTECTED]> Sent: Sunday, August 17, 2003 10:04 AM Subject: RE: [PHP-DB] array issue > Good point and nice find, Jeff! > > I wasn't sure

RE: [PHP-DB] array issue

2003-08-17 Thread Aaron Wolski
y too? > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: August 17, 2003 11:48 AM > To: Aaron Wolski > Cc: 'PHP-DB'; 'OpenSource' > Subject: RE: [PHP-DB] array issue > > > This may or may not make sense for your iss

RE: [PHP-DB] array issue

2003-08-17 Thread jeffrey_n_Dyke
PROTECTED]>, "'PHP-DB'" <[EMAIL PROTECTED]> z.com> cc:

RE: [PHP-DB] array issue

2003-08-17 Thread Aaron Wolski
$values) { fputs($fp, $value); } //close the file stuff here HTH Aaron > -Original Message- > From: OpenSource [mailto:[EMAIL PROTECTED] > Sent: August 17, 2003 11:31 AM > To: PHP-DB > Subject: [PHP-DB] array issue > Importance: High > > hi ya'll >

[PHP-DB] array issue

2003-08-17 Thread OpenSource
hi ya'll I am having a nightmare on this issue of mine. I've got this array that I need to write to a file... sample code below while (something); { query data base $r_ul=ifx_fetch_row($sideQuery4); $type1 = array($rotation."\n"); switch ($r_ul['number']) { case '4';

Re: [PHP-DB] array fill/sort question

2003-06-11 Thread Sean Burlington
Snijders, Mark wrote: hi, no the both sollutions won't work cause: I can't sort within a query cause subnetaddr is a varchar ("10.10.10.10") so it will be ordere like this 10.10.10.10 100.10.10.10 60.10.10.10 and that's not good cause 60 is smaller as 100, so with the function ip2long() i will

Re: [PHP-DB] array fill/sort question

2003-06-11 Thread Ignatius Reilly
() ) - compare successively item by item HTH Ignatius _ - Original Message - From: "Snijders, Mark" <[EMAIL PROTECTED]> To: "'Becoming Digital'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, June 11, 2003 8:33 A

RE: [PHP-DB] array fill/sort question

2003-06-10 Thread Snijders, Mark
do a query again to get the other fields of the table, and that's not good (2500 rows) so can please still somebody help me with this? -Original Message- From: Becoming Digital [mailto:[EMAIL PROTECTED] Sent: dinsdag 10 juni 2003 15:42 To: [EMAIL PROTECTED] Subject: Re: [

Re: [PHP-DB] array fill/sort question

2003-06-10 Thread Becoming Digital
rray for the desired result. Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: "Snijders, Mark" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, 10 June, 2003 08:55 Subject: [PHP-DB] array fill/sort question hi, I'

Re: [PHP-DB] array fill/sort question

2003-06-10 Thread Kieu D. Trang
hi, you can add the ip2long() function into your SELECT statement and have an ORDER BY clause at the end like this... SELECT s_id, subnet_name, ip2long('subnetaddr'), subnetmask,dnsdomain, location, contact, ccn FROM subnets ORDER BY subnetaddrr; hope it helps. KD On Tue, 10 Jun 2003, Snijders

[PHP-DB] array fill/sort question

2003-06-10 Thread Snijders, Mark
hi, I'm working on a ipaddres/subnet programm now i have a talbe with a lot of information about ip-addresses i'm having this query: SELECT s_id, subnet_name,subnetaddr,subnetmask,dnsdomain, location, contact, ccn FROM subnets the subnetaddr field looks like this : 100.20.20.1 and is ofcourse

Re: [PHP-DB] Array Pointer

2003-06-05 Thread Chris Mach
My database is set up in this way: fan_roster: has player id (play_id) , week, and stats on that player for that week. So there are 20 records for each player, because there are 20 weeks. So what I need to do is add up all the players weekly totals. so pass_yrd1 for week1 + pass_yrd1 for week2 et

RE: [PHP-DB] Array Pointer

2003-06-04 Thread Ford, Mike [LSS]
> -Original Message- > From: Ian Fingold [mailto:[EMAIL PROTECTED] > Sent: 03 June 2003 16:58 > > Ok I'm trying to write this function to up date some fields > in my database > so i'm grabbing some info from a query and throwing it into > an array (with > mysql_fetch_array). > > one of

[PHP-DB] Array Pointer

2003-06-04 Thread Ian Fingold
Ok I'm trying to write this function to up date some fields in my database so i'm grabbing some info from a query and throwing it into an array (with mysql_fetch_array). one of the values i'm puting into that array is the table id. I'm then comparing the table id with the value of $i in my loop. N

Re: [PHP-DB] Array Question

2003-06-03 Thread CPT John W. Holmes
> Hello everyone. If I wanted to pass a item ID along with a quantity to an > associative array called "CartArray" how would I pass it to the PHP script? > > I'll get this shopping cart working yet !! If the question is how do you pass an array to another PHP page, you serialize() and urlencode()

RE: [PHP-DB] Array Question

2003-06-03 Thread Gary . Every
27;]['qty']="32"; Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com > -Original Message- > From: Boa Constructor [mailto:[EMAIL PROTECTED] > Sent: Monday, June 02,

Re: [PHP-DB] Array Question

2003-06-03 Thread Boa Constructor
RE: [PHP-DB] Array QuestionCheers Gary, and in the html would I put something like: buy this item Simple question I know! Jay, yup thats all I want to do, just assign two values into an array. Thank you, Graeme :) - Original Message - From: [EMAIL PROTECTED] To: [EMAIL

RE: [PHP-DB] Array Question

2003-06-03 Thread Gary . Every
lto:[EMAIL PROTECTED] > Sent: Monday, June 02, 2003 2:27 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Array Question > > > Hello everyone. If I wanted to pass a item ID along with a > quantity to an > associative array called "CartArray" how would I pass

[PHP-DB] Array Question

2003-06-03 Thread Boa Constructor
Hello everyone. If I wanted to pass a item ID along with a quantity to an associative array called "CartArray" how would I pass it to the PHP script? I'll get this shopping cart working yet !! Cheers, Graeme :) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://

[PHP-DB] array question

2003-06-02 Thread John Coder
After Wracking my brain for too long on this I decided to give in and ask. I have holes in an array that came from a database. I put the holes there with unset some values so no prob. Now I need to fill the holes. Below is what I have and what I need for further manipulations. Array ( [0] =>

[PHP-DB] array manipulation with foreach

2003-03-26 Thread David Rice
I am trying to make a bit of code that takes values from 2 arrays, one array has a list of all the date's of this week starting from sunday, $arraydate[$n] = "the date" where $n is an integer between 0+6 the other is a multidimensional array composition as such; $rota[$staffid][$x] = "date sta

[PHP-DB] Array & loops

2003-03-06 Thread Robin Sanchez
I am creating a results page for completed and uncompleted procedures. I am repeating a lot of the code and wonder if there is an easier way to do this. $neh="select * from pro_list, complete_pro where pro_list.pro_name ='Neurological Exam/History' and complete_pro.proid=pro_list.proid and complet

Re: [PHP-DB] Array key problem

2003-02-25 Thread Jason Wong
On Wednesday 26 February 2003 00:37, Jorge Miguel Fonseca Martins wrote: As this has nothing to do with databases you should post to the php-general list. > $test[]="a"; > $test[]="b"; > > foreach ($test as $key=>$value) > { > if($key == "something") echo $key > } > > even though theres n

[PHP-DB] Array key problem

2003-02-25 Thread Jorge Miguel Fonseca Martins
Hi! Anyone got an idea what the problem may be with the following code $test[]="a"; $test[]="b"; foreach ($test as $key=>$value) { if($key == "something") echo $key } even though theres no key in the array named "something" the code will print the key "0" Thanks

RE: [PHP-DB] array with two dimensions

2003-02-17 Thread Kelly Protsko
ailto:[EMAIL PROTECTED]] Sent: February 17, 2003 8:28 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] array with two dimensions Hi all, Got a little problem here, I have a mysql query that looks like this SELECT SUM(value) as value, YEAR(dileveret) as year FROM table GROUP BY YEAR(dileveret) It

[PHP-DB] array with two dimensions

2003-02-17 Thread Lars Rasmussen
Hi all, Got a little problem here, I have a mysql query that looks like this SELECT SUM(value) as value, YEAR(dileveret) as year FROM table GROUP BY YEAR(dileveret) It works just fine, but i need to make a array that can could do somthing like this (know it doesent work) $ALL_VALUES[$year] +=

[PHP-DB] Array

2003-01-31 Thread Rui Miguel Palma
como posso adicionar valores a um array com dois campos É algo assim: tenho n alunos para os quais vou á base de dados buscar resultados e quero criar uma array com o id e o email de cada um, por forma a ir buscar da seguinte forma $aluno[0]["email"] e $aluno[0]["id"]?? Desde já os melhores cum

[PHP-DB] Array Trouble

2003-01-29 Thread Tyler Whitesides
Hi, I e-mailed this before, but the attachments didnt go through. I am designing something that my tech team can use to track the maintenancing of our school district computers. I have a table of data (formitems) that contains tasks that must be completed for that computer depending on the platfo

Re: [PHP-DB] Array trouble

2003-01-24 Thread Jason Wong
On Friday 24 January 2003 14:18, Tyler Whitesides wrote: > I have been having a lot of trouble getting an array into the MySQL table > like I want it. This is supposed to take the current maintenance tasks > from a table in the database on apple.php each of these is given a name > $item[autoNo] w

[PHP-DB] Array trouble

2003-01-23 Thread Tyler Whitesides
Hi, I have been having a lot of trouble getting an array into the MySQL table like I want it.  This is supposed to take the current maintenance tasks from a table in the database on apple.php each of these is given a name $item[autoNo] where autoNo is the auto_increment id that task is assoc

[PHP-DB] Array trouble

2003-01-23 Thread Tyler Whitesides
Hi, I have been having a lot of trouble getting an array into the MySQL table like I want it.  This is supposed to take the current maintenance tasks from a table in the database on apple.php each of these is given a name $item[autoNo] where autoNo is the auto_increment id that task is assoc

Re: [PHP-DB] Array problems

2003-01-22 Thread Paul Burney
on 1/22/03 12:08 AM, Michael Conway at [EMAIL PROTECTED] appended the following bits to my mbox: > I find myself stuck in coming up with a way to cycle through this > array of db results for porting to a graphing script that I did not > write. My latest attempt to get around this problem is below

[PHP-DB] Array problems

2003-01-21 Thread Michael Conway
I find myself stuck in coming up with a way to cycle through this array of db results for porting to a graphing script that I did not write. My latest attempt to get around this problem is below. Outside of the $graph->SetDataValues(array( ));, echoing $array[$i] produces the desired result

Re: [PHP-DB] Array Issue help please

2003-01-20 Thread Jason Wong
On Monday 20 January 2003 17:50, Dave Carrera wrote: > I have nearly got this working but it dose not seem to loop though or > return the result > > I have done something wrong and I ask one of you coders that are much > cleverer that I to glance over my code to see the obvious mistake / s. Can y

[PHP-DB] Array Issue help please

2003-01-20 Thread Dave Carrera
Hi All I have nearly got this working but it dose not seem to loop though or return the result I have done something wrong and I ask one of you coders that are much cleverer that I to glance over my code to see the obvious mistake / s. Thank you in advance for any help Dave Carrera // Start

Re: [PHP-DB] Array help please

2003-01-19 Thread Peter Beckman
$arr = array(".co.uk",".com",".net",".me.uk"); echo "Top Level Domains: "; while(list(,$tld)=each($arr)) { echo $tld.", "; } On Sun, 19 Jan 2003, Dave Carrera wrote: > Hi All > I am trying to create a tld lookup script for uk and main us domains. > > I have success by creating multiple functi

[PHP-DB] Array help please

2003-01-19 Thread Dave Carrera
Hi All I am trying to create a tld lookup script for uk and main us domains. I have success by creating multiple function hardcode the whois server and tld but I would love to be able to make an array of tlds then step through the array to check availability of domain. Example $arr = array(‘.

[PHP-DB] Array printing

2003-01-12 Thread Michael Conway
I am using an array to return the contents of a file. The file root is located on the db and the file content is correctly rendered using the following code: echo "\n\t" . $arrText= file($row["description"]); for ($i=0; $i$arrText[$i]"); } Everything works fine except that the paragraph

Re: [PHP-DB] array sorting

2002-11-12 Thread Ignatius Reilly
ndexes? HTH Ignatius - Original Message - From: "Martin Allan Jensen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 12, 2002 1:37 PM Subject: [PHP-DB] array sorting Hi everyone... I got a bit longer now.. But i have som

[PHP-DB] array sorting

2002-11-12 Thread Martin Allan Jensen
Hi everyone... I got a bit longer now.. But i have some trouble sorting my arrays I get this array returned. Array ( [0] => Array ( [0] => 10 [1] => 40 [2] => 50 [3] => 80 [4] => 130 [5] => 220 [6] => 320 ) [1] => Array ( [0] => 10 [1] => 40 [2] => 50 [3] => 80 [4] => 130 [5] => 220

Re: [PHP-DB] Array question

2002-11-08 Thread Maxim Maletsky
to precise: $array = Array('name'=>'Maxim', 'surname'=>'Maletsky'); unset($array['name']); // now array has this structure: // Array('surname'=>'Maletsky') -- Maxim Maletsky [EMAIL PROTECTED] Jason Wong <[EMAIL PROTECTED]> wrote... : > On Friday 08 November 2002 17:25, nikos wrote: > > Doe

Re: [PHP-DB] Array question

2002-11-08 Thread Jason Wong
On Friday 08 November 2002 17:25, nikos wrote: > Does anybody know how to remove an item from an array? > Let's say > > $array('banna', 'apple','cherry') > foreach ($array as $value) { > if ($value=='chery') DELETE $value FROM $array > ... unset(). -- Jason Wong -> Gremlins Associates -> ww

[PHP-DB] Array question

2002-11-08 Thread nikos
Does anybody know how to remove an item from an array? Let's say $array('banna', 'apple','cherry') foreach ($array as $value) { if ($value=='chery') DELETE $value FROM $array ... Thanks

RE: [PHP-DB] Array Initialization

2002-10-13 Thread John W. Holmes
$newInfo[$stripped] = $value; ---John Holmes... > -Original Message- > From: Rich Hutchins [mailto:[EMAIL PROTECTED]] > Sent: Sunday, October 13, 2002 3:42 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Array Initialization > > Please forgive me ahead of time,

[PHP-DB] Array Initialization

2002-10-13 Thread Rich Hutchins
Please forgive me ahead of time, but I didn't want to subscribe to the high-vol general list for a single question. Actually, I need this to prep data to be passed to a db, so it's kind of close. I have a variable number of hidden fields being passed from page A into page B via POST. On page B, I

[PHP-DB] array intersect with 2 arrays created from mysql

2002-10-07 Thread Nigel Dunn
Hi, If anyone can help me with this I'd be most appreciative. I'm constructing 2 arrays of IDs from 2 different tables. Then I want to compare one to the other and only use the results that both arrays share in common to do a query loop that pulls the information for the related IDs to displa

[PHP-DB] Array help needed :-(

2002-10-07 Thread Chris Payne
Hi there everyone, I have a problem i'm trying to figure out but i'm not too good with arrays, just know the basics, if anyone could help me out on this it would be wonderful :-) I have two sets of data in columns of a MySQL DB, these items are size and price. Size is seperate by comma's in th

Re: [PHP-DB] array problem

2002-06-21 Thread Jason Wong
On Thursday 20 June 2002 23:26, Richard Black wrote: > By passing a second parameter to mysql_fetch_array, MYSQL_ASSOC > > This means you only get back an array with the values indexed by > fieldname. Or just use mysql_fetch_assoc(). -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk O

[PHP-DB] ARRAY, IF & INSERT

2002-06-21 Thread César Aracena
Hi all. I have this form in which one Administrator can insert new members and after that, in another page, a form where he/she can insert the new member’s sons & daughters. I want to display a table with “text inserts” into the admin can type let’s say a maximum of 5 kids in the second page. Th

Re: [PHP-DB] Array HELL!!!!

2002-02-25 Thread biorn
Try putting the hidden element statement down inside the while loop in he second page, but change it to "" and add $id=$row['id']; before it. I will show below where it should go. HTH MB jas <[EMAIL PROTECTED]> said: > I have made the changes you suggested which if you ask me have been

Re: [PHP-DB] Array HELL!!!!

2002-02-22 Thread jas
I have made the changes you suggested which if you ask me have been the most informative answers I have recieved thus far. I did run into a slight snag on line 21 which is this on my confirmation page "" and the parse error is as follows... Parse error: parse error, expecting `STRING' or `NUM_STR

Re: [PHP-DB] Array HELL!!!!

2002-02-22 Thread biorn
Ok, you have almost got it. I have made little remarks further down in your code which should just about do it for you. jas <[EMAIL PROTECTED]> said: > I don't know what it is but I am having a hell of a time trying to get some > results of a query setup into an array or variable (too much of

Re: [PHP-DB] Array HELL!!!!

2002-02-22 Thread jas
[EMAIL PROTECTED]] > > Sent: Friday, February 22, 2002 4:37 AM > > To: [EMAIL PROTECTED] > > Subject: [PHP-DB] Array HELL > > > > > > I don't know what it is but I am having a hell of a time trying > > to get some > > results of a query set

RE: [PHP-DB] Array HELL!!!!

2002-02-22 Thread SpyProductions Support Team
That's not Array Hell, this is Array Hell: $Hell = array("satan","fire","brimstone"); -Mike > -Original Message- > From: jas [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 22, 2002 4:37 AM > To: [EMAIL PROTECTED] > Subject: [PH

[PHP-DB] Array HELL!!!!

2002-02-22 Thread jas
I don't know what it is but I am having a hell of a time trying to get some results of a query setup into an array or variable (too much of a newbie to know which) that can be passed to a confirmation page before deleting the record from a table. I have given up working on this but for those of y

RE: [PHP-DB] Array not supported for strings???

2002-01-04 Thread Rick Emery
Need to show us more code... -Original Message- From: Andy [mailto:[EMAIL PROTECTED]] Sent: Friday, January 04, 2002 2:00 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Array not supported for strings??? Hi there, I have a problem with an array: This code: $country[] = $row->coun

[PHP-DB] Array not supported for strings???

2002-01-04 Thread Andy
Hi there, I have a problem with an array: This code: $country[] = $row->country; Creates following error msg: Fatal error: [] operator not supported for strings The wired thing is, that the same procedure works through my whole application, but not in this case. Did anybody make the sam

  1   2   >