[PHP-DB] Upgrading PHP

2002-08-14 Thread Julio Cuz, Jr.

Hi--

I'm currently running 4.0.4pl1 on RedHat 7.0 and I want to upgrade to PHP 
4.2.2is there anything special I have to do BEFORE or AFTER the 
install?  Or is it just a straight re-install of PHP on top of the current 
Version?  THANKS!

Julio Cuz, Jr.
[EMAIL PROTECTED]
Information Services
Riverside Community College


[PHP-DB] Check Boxes

2002-04-29 Thread Julio Cuz, Jr.

Hi--

Does anyone have any suggestions, SAMPLES, or ideas on how to STORE, 
RETRIEVE, AND PROCESS values for Check Boxes w/PHP  Postgresql?

Thanks!

Julio Cuz, Jr.
Riverside Community College
[EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Variables

2002-04-25 Thread Julio Cuz, Jr.

HI--
* I have the following variables: $c1 thru $c10.
* I also have a FOR loop like this:
 for($count = 0; $count  sizeof($artist); $count++)
 { echo i$artist[$count]/ibr; }
 // $artist is a list of ten (10) artist's names.
* What I'm trying to do is something like this:  Combine the variables 
with the info inside the FOR loop:
 for($count = 0; $count  sizeof($artist); $count++)
 {  //Trying to assign the value of $c1, $c2, $c3, etc. 
using the value of the variable $count.
//But so far, it only processes the value of $count 
alone, and it ignores $c
 //The line below should read like this:  $c1 = $artist[0], 
next line:  $c2 = $artist[1], etc.
 $c . $count+1 = $artist[$count];
 }

Help!!!

Julio Cuz, Jr.
Riverside Community College
[EMAIL PROTECTED]


Re: [PHP-DB] Error in non existing line

2001-04-06 Thread Julio Cuz, Jr.

Dan,

I think you're missing the end quotes (")  here:

...
 where image='$arr_Images[$randID]'  "  ;
...

At 10:57 PM 4/6/2001 +0300, Dan Guja wrote:
Parse error: parse error in /home/httpd/.../htdocs/index.php on line 90

And I have just 89 lines

Here are the  last linse from index.html:
?php
if ($verify ==7){
$connection = mysql_connect("localhost", "user", "password")
 or die("Cannot connect");
$db = mysql_select_db("rating" , $connection);
$sql = " update tb
  set rating=rating+$rating
  where image='$arr_Images[$randID]';
$sql_result= mysql_query($sql , $connection);
mysql_close($connection);
  }
?
/body
/html



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


Julio Cuz, Jr.
Riverside Community College
[EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] SELECT statement

2001-04-04 Thread Julio Cuz, Jr.

Hi--

Every time I run the following code, I get this error if I use a NUMBER for 
the 'Email' case:
"Warning: Unable to jump to row 0 on PostgreSQL result index 2 in 
/html/rccd/remodel/display2.php on line 35"

or, if I use a string (i.e. [EMAIL PROTECTED]), I get this error message:
"Warning: PostgreSQL query failed: ERROR: Attribute 'jcuz' not found in 
/html/rccd/remodel/display2.php on line 33"

Please help!

switch ($Search) {
case "WO":
 settype ($find,integer);
 $sql = "SELECT * FROM \"Remodel\" WHERE \"WO\" LIKE $find";
 break;

case "Email":
 $sql = "SELECT * FROM \"Remodel\" WHERE \"Email\" LIKE $find";
 break;
 }
--

Julio Cuz, Jr.
Riverside Community College
[EMAIL PROTECTED] 


Re: [PHP-DB] SELECT statement

2001-04-04 Thread Julio Cuz, Jr.

Ron,

Thanks for your help, but my problem still there even when I made the 
following changes:

$sql = "SELECT * FROM \"Remodel\" WHERE Email=\"".$find."\"";

By the way, you're correct when saying that "WO" and "Email" are column 
names and '"$find" is what the user entered when searching for a record.

At 03:39 PM 4/4/2001 -0700, you wrote:
At 03:24 PM 4/4/2001 -0700, Julio Cuz, Jr. wrote:
Every time I run the following code, I get this error if I use a NUMBER 
for the 'Email' case:
"Warning: Unable to jump to row 0 on PostgreSQL result index 2 in 
/html/rccd/remodel/display2.php on line 35"

The problem is that your query is equivalent to going:

SELECT * FROM "Remodel" WHERE "WO" LIKE 1; // or some other numerical value

The "WO" is a string because it is in quotes so you are saying:

WHERE string = integer

Ain't gonna happen so the result is always empty.  What you want probably 
is (assuming WO is a column name):

$sql = "SELECT * FROM \"Remodel\" WHERE WO=\"".$find."\"";

It is equals since you are using an integer instead of a string (like is 
for strings).

or, if I use a string (i.e. [EMAIL PROTECTED]), I get this error message:
"Warning: PostgreSQL query failed: ERROR: Attribute 'jcuz' not found in 
/html/rccd/remodel/display2.php on line 33"

Same problem.  "EMAIL" means the string "EMAIL" not the column called "EMAIL".

Cheers,

Ron

-
Island Net AMT Solutions Group Inc.  Telephone:  250 383-0096
1412 Quadra  Toll Free:1 800 331-3055
Victoria, B.C.   Fax:250 383-6698
V8W 2L1  E-Mail:    [EMAIL PROTECTED]
Canada   WWW:   http://www.islandnet.com/
-



Julio Cuz, Jr.
Riverside Community College
[EMAIL PROTECTED] 


[PHP-DB] Validating forms

2001-04-02 Thread Julio Cuz, Jr.

Hi--

I have a form that cannot have a specific field blank, so I would like to 
add a message box saying "fill out the x field," is there a way to do this 
WITHOUT having to refresh the page?

Julio Cuz, Jr.
Riverside Community College
[EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Error

2001-03-15 Thread Julio Cuz, Jr.

Hi--

When I run the following code:

if($myrow = pg_fetch_array($result,0)) {
 echo "ok...";
} else {
  die(include("../sqlerror.inc"));
}

I get this error message:

"Warning: Unable to jump to row 0 on PostgreSQL result index 2 in 
/html/rccd/remodel/display.php on line 27"

Please help!



[PHP-DB] Evaluating T/F.

2001-03-14 Thread Julio Cuz, Jr.

Hi--

I'm trying to evaluate the following lines to see if "$myrow" is false or 
true, can you help?

-
$sql = "SELECT * FROM Employees WHERE ID=$id";
$result = pg_exec($db, $sql) or die(include("../sqlerror.inc"));

 $myrow = pg_fetch_array($result,0) or die(include("../sqlerror.inc"));
-------------

Julio Cuz, Jr.
Riverside Community College
[EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Evaluating T/F (2)

2001-03-14 Thread Julio Cuz, Jr.

Hi--

Sorry, but I didn't finish my previous e-mail :)


 Hi--

 I'm trying to evaluate the following lines to see if "$myrow" is false or 
true, can you help?

-
$sql = "SELECT * FROM Employees WHERE ID=$id";
$result = pg_exec($db, $sql) or die(include("../sqlerror.inc"));
$myrow = pg_fetch_array($result,0) or die(include("../sqlerror.inc"));
-------------

Julio Cuz, Jr.
Riverside Community College
[EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Evaluting T/F (3)

2001-03-14 Thread Julio Cuz, Jr.

HI--  Sorry again...aggg...

Hi--

I'm trying to evaluate the following lines to see if "$myrow" is false or 
true, can you help?

-
$db .;
$sql = "SELECT * FROM Employees WHERE ID=$id";
$result = pg_exec($db, $sql);
$myrow = pg_fetch_array($result,0) or die(include("../sqlerror.inc"));
-------------

Julio Cuz, Jr.
Riverside Community College
[EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] SELECT problem

2001-02-22 Thread Julio Cuz, Jr.

Hi--

What's wrong with this line of code?

echo("SELECT onChange=\"window.location=\"$PHP_SELF?campus+=\"this.value\"\"\"
NAME='campus'");



Julio Cuz, Jr.
Riverside Community College
[EMAIL PROTECTED] 


[PHP-DB] SELECT problem (2)

2001-02-22 Thread Julio Cuz, Jr.

Hi--

Sorry, I forgot to finish the previous e-mail:  What's wrong with this line?

echo("SELECT onChange=\"window.location=\"$PHP_SELF?campus+=\"this.value\"\"\"
NAME='campus'");

I'm trying to RELOAD the current page with the new value of "$campus" after 
the user selects a campus from a drop-down menu.  But I can't get the 
"this.value" line to pass the value of "$campus" to the new loaded page.

Help!



Julio Cuz, Jr.
Riverside Community College
[EMAIL PROTECTED] 


[PHP-DB] Variables

2001-02-22 Thread Julio Cuz, Jr.

Hi--

I know there is a tutorial out there that shows you how NOT TO LOSE any 
variable values if your browser does a refresh or a reload.  Please assist.

For example, if a user fills out fields 1, 2, and 3, but on field 4 the 
browser is forced to do a reload, data for fields 1-3 should be there, 
including field 4 this time.

Julio Cuz, Jr.
Riverside Community College
[EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] CLEAR screen command

2001-02-22 Thread Julio Cuz, Jr.

Hi--

Is there a CLEAR SCREEN command in PHP?

Julio Cuz, Jr.
Riverside Community College
[EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Drop-down menu selection

2001-02-20 Thread Julio Cuz, Jr.

Hi--

I hope all of you are having a great long weekend!

Let's say I have four (4) tables:

- "campus" that holds all my campuses' names (only 3),
- "building_campus1" that holds all buildings for 'campus1',
- "building_campus2" that holds all buildings for 'campus2',
- "building_campus3" that holds all buildings for 'campus3'.

If the user selects "campus 1" from a drop-menu, how can I select 
"buildings for campus 1" on a second drop-down menu?  In other words, how 
do I select the corresponding "building's table" when any "campus" is selected?

Thanks!

P.S.  I have tried the 'onChange' command, but I guess I got the syntax wrong:

=
// $campus:
?php
echo("SELECT onChange='building.value = building.this.value' NAME='campus'");
$cmlist = @pg_exec($db, "SELECT * FROM \"Campus\"") or 
die(include("../sqlerror.inc"));
$i = 0;
$x = pg_numrows($cmlist);
while ($i  $x):
 $clist = pg_fetch_array($cmlist,$i);
 echo "OPTION 
VALUE='".$clist["Campus"]."'".$clist["Campus"]."/OPTION";
 $i++;
endwhile;
echo("/SELECT");
?

$building:
?php
echo("SELECT NAME='building'");
$cmlist = @pg_exec($db, "SELECT * FROM building_$campus") or 
die(include("../sqlerror.inc"));
$i = 0;
$x = pg_numrows($cmlist);
while ($i  $x):
 $clist = pg_fetch_array($cmlist,$i);
 echo "OPTION 
VALUE='".$clist["Building"]."'".$clist["Building"]."/OPTION";
 $i++;
endwhile;
echo("/SELECT");
?
=

Julio Cuz, Jr.
Riverside Community College
[EMAIL PROTECTED] 


[PHP-DB] Freetds/ODBC/Openlinks?

2001-01-23 Thread Julio Cuz, Jr.

Hi--

Bottom line:  What's the most used way of talking to MSSQL from PHP 
4?  Freetds/ODBC/Openlinks/other?

Julio Cuz, Jr.
Riverside Community College
[EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]