p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: Re: form action seems right but no output - fixed


Message #1 by "Lawrence" <lkrubner@g...> on Wed, 27 Feb 2002 03:19:30 -0500
Fixed the problem. Sorry for wasting everyone's time. The quote marks around the intergers were

turning them into strings. Earlier in the day, before I put quote marks around them, MySQL gave me

"Syntax Error" errors, and putting in the quotes made the errors go away. Now I remove the quotes

and I get no errors. I'm not sure what else changed.



Apologies, again, for taking up so much bandwidth.







----- Original Message -----

From: "Nikolai Devereaux" <yomama@u...>

To: "beginning php" <beginning_php@p...>

Sent: Tuesday, February 26, 2002 7:33 PM

Subject: [beginning_php] Re: form action seems right but no output





>

> resource id #11 is the unique identifier that PHP uses internally to access

> your query result.

>

> When you connect to a database, you get a resource ID.  when you make a

> query, you get a resource ID.  etc...  these ID's are passed to many of the

> other functions (e.g. mysql_fetch_row) so that the function knows which

> query result to pull the next row from.

>

> nik

>

> > -----Original Message-----

> > From: Lawrence [mailto:lkrubner@g...]

> > Sent: Tuesday, February 26, 2002 2:54 PM

> > To: beginning php

> > Subject: [beginning_php] Re: form action seems right but no output

> >

> >

> > I'm not sure why the die(mysql_error()) line didn't flag a

> > problem for me, but when I go into the

> > function that makes a connection to the database and uncomment

> > the print_r() lines, I get a message

> > in my browser that says, simply,

> > Resource id #11

> >

> > I don't know what that means. This is function I'm using to

> > connect. Other functions also call it,

> > and the other functions have no trouble with it. I'm sure I'm

> > missing something obvious, but I don't

> > know what it is.

> >

> >

> >

> > //

> > // this function connects Log Rhythm to the database

> > function connectLrToDb() {

> > // this brings the database variables into the function

> > global $host ;

> > global $username ;

> > global $passwordDb ;

> > global $database ;

> > // this connects to the server

> > $result1 = mysql_connect ($host, $username, $passwordDb) or die

> > (mysql_error());

> > // this selects the correct database

> > $result2 = mysql_select_db ($database) or die (mysql_error());

> > // uncomment the following lines if you need to debug

> > print_r($result1) ;

> > print_r($result2) ;

> > return ;

> > }

> >

> >

> >




> > $subst('Email.Unsub').

>

>






Message #2 by Hermawan Haryanto <hermawan@d...> on Wed, 27 Feb 2002 18:52:42 +0700
<P>Nevermind, we just have to shoot nik for this. :: :-) ))))<BR></P>

<P>Thanks</P>

<P>Hermawan Haryanto<BR><A

href="mailto:hermawan@h...">hermawan@h...</A><BR>--<BR>Dream it ?,

Code it!<BR><BR><BR></P>

<BLOCKQUOTE dir=ltr style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px;

MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">

<DIV style="FONT: 10pt arial">--------- Original message --------<BR>From:

"Lawrence" &lt;lkrubner@g...&gt;<BR>To: "beginning php"

&lt;beginning_php@p...&gt;<BR>Subject: [beginning_php] Re: form

action seems right but no output - fixed<BR>Date: 02-27-02

18:44<BR><BR><FONT face="Courier New" size=2>Fixed the problem. Sorry for

wasting everyone's time. The quote marks around the intergers

were<BR>turning them into strings. Earlier in the day, before I put quote

marks around them, MySQL gave me<BR>"Syntax Error" errors, and putting in

the quotes made the errors go away. Now I remove the quotes<BR>and I get no

errors. I'm not sure what else changed.<BR><BR>Apologies, again, for taking

up so much bandwidth.</FONT></DIV></BLOCKQUOTE><br>

________________________________________________<br>

This e-mail was sent by dMonster.com Web Based Mail 3.0<br>



Message #3 by "Nikolai Devereaux" <yomama@u...> on Wed, 27 Feb 2002 11:53:18 -0800

=)  Glad it's working out.



-----Original Message-----

From: Hermawan Haryanto [mailto:hermawan@d...]

Sent: Wednesday, February 27, 2002 3:53 AM

To: beginning php

Subject: [beginning_php] Re: form action seems right but no output - fixed





Nevermind, we just have to shoot nik for this. :: :-) ))))







--------- Original message --------

From: "Lawrence" <lkrubner@g...>

To: "beginning php" <beginning_php@p...>

Subject: [beginning_php] Re: form action seems right but no output - fixed

Date: 02-27-02 18:44



Fixed the problem. Sorry for wasting everyone's time. The quote marks around

the intergers were

turning them into strings. Earlier in the day, before I put quote marks

around them, MySQL gave me

"Syntax Error" errors, and putting in the quotes made the errors go away.

Now I remove the quotes

and I get no errors. I'm not sure what else changed.



Apologies, again, for taking up so much bandwidth.




  Return to Index