RE: [PHP-DB] EMERGENCY!!
| From: | Dennis Cole | Date: | Wed, 31 Dec 2003 18:28:29 +0000 |
| Subject: | RE: [PHP-DB] EMERGENCY!! | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-32237@lists.php.net to get a copy of this message | ||
I think that it has more to do with the type of fields he is putting it
into:
--
I am trying to build a web site for our inventory. I have a mysql DB
that I Connect to. The following code is what I use. The array products
wont go p-past the 61st ish product, when there are hundreds for it to
deal with.
--
Dennis
www.oursanford.com
-----Original Message-----
From: Martin Marques [mailto:martin@bugs.unl.edu.ar]
Sent: Wednesday, December 31, 2003 1:14 PM
To: John Greco; php-db@lists.php.net
Subject: Re: [PHP-DB] EMERGENCY!!
You throw code to the list with no information about what errors or
warnings
you got. Why do you say it doesn't work? What happens when you run the
script?
El Mié 31 Dic 2003 12:46, John Greco escribió:
> I am trying to build a web site for our inventory. I have a mysql DB
that i
> connect to.
> The following code is what I use. The array products wont go past
>
> I tried this first:
>
> $sql5 = "select * from product where whseNum = '".$whseNumber."' order
by
> prodNum";
> $result5 = mysql_query($sql5, $conn) or die (mysql_errno() . ": " .
> mysql_error(). "\n");
> while ($row5 = mysql_fetch_array($result5))
> {
> $products[] = $row5['prodNum'];
> }
> foreach ($products as $prodNum => $value)
> {
> $sql4 = "UPDATE product SET physCount='".$_POST[$value]."' WHERE
> prodNum='".$value."' AND
> whseNum='".$whseNumber."'";
> $result4 = mysql_query($sql4, $conn) or die(mysql_errno() . ": " ..
> mysql_error(). "\n");
> echo ("In the loop: ".$value);
> }
>
> Then I tried this:
> $sql5 = "select * from product where whseNum = '".$whseNumber."' order
by
> prodNum";
> $result5 = mysql_query($sql5, $conn) or die (mysql_errno() . ": " ..
> mysql_error(). "\n");
> while ($row5 = mysql_fetch_assoc($result5))
> {
> $products[] = $row5['prodNum'];
> $sql4 = "UPDATE product SET physCount='".$_POST[$value]."' WHERE
> prodNum='".$row5['prodNum']."' AND
> whseNum='".$whseNumber."'";
> $result4 = mysql_query($sql4, $conn) or die(mysql_errno() . ": " ..
> mysql_error(). "\n");
> echo ("In the loop: ".$row5['prodNum']."<br>");
> }
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
select 'mmarques' || '@' || 'unl.edu.ar' AS email;
-----------------------------------------------------------------
Martín Marqués | mmarques@unl.edu.ar
Programador, Administrador, DBA | Centro de Telemática
Universidad Nacional
del Litoral
-----------------------------------------------------------------
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.554 / Virus Database: 346 - Release Date: 12/20/2003
Dennis, KC8YHQ
www.oursanford.com
-----Original Message-----
From: Martin Marques [mailto:martin@bugs.unl.edu.ar]
Sent: Wednesday, December 31, 2003 1:14 PM
To: John Greco; php-db@lists.php.net
Subject: Re: [PHP-DB] EMERGENCY!!
You throw code to the list with no information about what errors or
warnings
you got. Why do you say it doesn't work? What happens when you run the
script?
El Mié 31 Dic 2003 12:46, John Greco escribió:
> I am trying to build a web site for our inventory. I have a mysql DB
that i
> connect to.
> The following code is what I use. The array products wont go past
>
> I tried this first:
>
> $sql5 = "select * from product where whseNum = '".$whseNumber."' order
by
> prodNum";
> $result5 = mysql_query($sql5, $conn) or die (mysql_errno() . ": " .
> mysql_error(). "\n");
> while ($row5 = mysql_fetch_array($result5))
> {
> $products[] = $row5['prodNum'];
> }
> foreach ($products as $prodNum => $value)
> {
> $sql4 = "UPDATE product SET physCount='".$_POST[$value]."' WHERE
> prodNum='".$value."' AND
whseNum='".$whseNumber."'";
> $result4 = mysql_query($sql4, $conn) or die(mysql_errno() . ": " ..
> mysql_error(). "\n");
> echo ("In the loop: ".$value);
> }
>
> Then I tried this:
> $sql5 = "select * from product where whseNum = '".$whseNumber."' order
by
> prodNum";
> $result5 = mysql_query($sql5, $conn) or die (mysql_errno() . ": " ..
> mysql_error(). "\n");
> while ($row5 = mysql_fetch_assoc($result5))
> {
> $products[] = $row5['prodNum'];
> $sql4 = "UPDATE product SET physCount='".$_POST[$value]."' WHERE
> prodNum='".$row5['prodNum']."' AND
whseNum='".$whseNumber."'";
> $result4 = mysql_query($sql4, $conn) or die(mysql_errno() . ": " ..
> mysql_error(). "\n");
> echo ("In the loop: ".$row5['prodNum']."<br>");
> }
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
select 'mmarques' || '@' || 'unl.edu.ar' AS email;
-----------------------------------------------------------------
Martín Marqués | mmarques@unl.edu.ar
Programador, Administrador, DBA | Centro de Telemática
Universidad Nacional
del Litoral
-----------------------------------------------------------------
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.554 / Virus Database: 346 - Release Date: 12/20/2003
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.554 / Virus Database: 346 - Release Date: 12/20/2003