Re: [PHP-DB] Parsing Error

2001-09-05 Thread Bas Jobsen

Maybe rename your page to loose.php


-- 
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]




RE: [PHP-DB] Parsing Error

2001-07-07 Thread Larry Rivera

I don't see why you are using printf there try print instead or echo ;)0
-Original Message-
From: Jeff Grossman [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, July 07, 2001 6:56 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Parsing Error

Thanks Larry.

Now I am getting a printf too few arguments error on this line:

printf("mailto:[EMAIL PROTECTED]?subject=$store\%20$jobdesc\";>$jobdesc\n");

Thanks,
Jeff
"Larry Rivera" <[EMAIL PROTECTED]> wrote:

>After a brief look it appears that your call to mysql_query is
incorrect
>" after the query then "," then the link resource
>
>-Original Message-
>From: Jeff Grossman [mailto:[EMAIL PROTECTED]] 
>Sent: Saturday, July 07, 2001 6:23 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP-DB] Parsing Error
>
>I keep getting the following error:
>
>Warning: Supplied argument is not a valid MySQL result resource in
>/home/httpd/html/stats/jobs/listing.php on line 33
>
>Warning: Supplied argument is not a valid MySQL result resource in
>/home/httpd/html/stats/jobs/listing.php on line 43
>
>when I try to display the following webpage.  What am I doing wrong?
>
>"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd";>
>
>
>   Title
>
>
>$hostName="localhost";
>$userName="jeff";
>$password="jeff";
>$databaseName="jobs";
>$tableName="listings";
>
>// connnect to the database
>if (!($link=mysql_pconnect($hostName, $userName, $password))) {
>   DisplayErrMsg(sprintf("error connecting to host %s by user
>%s", $hostName, $userName));
>   exit();
>}
>
>// select the database
>if (!mysql_select_db($databaseName, $link)) {
>   DisplayErrMsg(sprintf("Error in selecting %s database",
>$databaseName));
>   DisplayErrMsg(sprintf("error:%d %s", mysql_errno($link),
>mysql_error($link)));
>   exit();
>}
>
>// send the SQL queries
>
>$result=mysql_query("SELECT * FROM listings WHERE store='West Covina',
>$link");
>
>// return how many rows
>$num_rows=mysql_num_rows($result);
>// check if greater than zero
>if($num_rows!=0) {
>printf("West Covina HREF=\"../test/stores.php#WC\">address");
>while ($row=mysql_fetch_array($result)) {
>$store=$rowid["store"];
>$jobdesc=$rowid["jobdesc"];
>printf("HREF=\"mailto:[EMAIL PROTECTED]?subject=$store\%20$jobdesc\";>$jobdesc>\n");
>}
>}
>mysql_free_result($result);
>
>?>
>
>
>
>
>
>Thank you,
>Jeff
>---
>Jeff Grossman ([EMAIL PROTECTED])

---
Jeff Grossman ([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 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]




Re: [PHP-DB] Parsing Error

2001-07-07 Thread Jeff Grossman

Thanks Larry.

Now I am getting a printf too few arguments error on this line:

printf("mailto:[EMAIL PROTECTED]?subject=$store\%20$jobdesc\";>$jobdesc\n");

Thanks,
Jeff


"Larry Rivera" <[EMAIL PROTECTED]> wrote:

>After a brief look it appears that your call to mysql_query is incorrect
>" after the query then "," then the link resource
>
>-Original Message-
>From: Jeff Grossman [mailto:[EMAIL PROTECTED]] 
>Sent: Saturday, July 07, 2001 6:23 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP-DB] Parsing Error
>
>I keep getting the following error:
>
>Warning: Supplied argument is not a valid MySQL result resource in
>/home/httpd/html/stats/jobs/listing.php on line 33
>
>Warning: Supplied argument is not a valid MySQL result resource in
>/home/httpd/html/stats/jobs/listing.php on line 43
>
>when I try to display the following webpage.  What am I doing wrong?
>
>"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd";>
>
>
>   Title
>
>
>$hostName="localhost";
>$userName="jeff";
>$password="jeff";
>$databaseName="jobs";
>$tableName="listings";
>
>// connnect to the database
>if (!($link=mysql_pconnect($hostName, $userName, $password))) {
>   DisplayErrMsg(sprintf("error connecting to host %s by user
>%s", $hostName, $userName));
>   exit();
>}
>
>// select the database
>if (!mysql_select_db($databaseName, $link)) {
>   DisplayErrMsg(sprintf("Error in selecting %s database",
>$databaseName));
>   DisplayErrMsg(sprintf("error:%d %s", mysql_errno($link),
>mysql_error($link)));
>   exit();
>}
>
>// send the SQL queries
>
>$result=mysql_query("SELECT * FROM listings WHERE store='West Covina',
>$link");
>
>// return how many rows
>$num_rows=mysql_num_rows($result);
>// check if greater than zero
>if($num_rows!=0) {
>printf("West Covina HREF=\"../test/stores.php#WC\">address");
>while ($row=mysql_fetch_array($result)) {
>$store=$rowid["store"];
>$jobdesc=$rowid["jobdesc"];
>printf("HREF=\"mailto:[EMAIL PROTECTED]?subject=$store\%20$jobdesc\";>$jobdesc>\n");
>}
>}
>mysql_free_result($result);
>
>?>
>
>
>
>
>
>Thank you,
>Jeff
>---
>Jeff Grossman ([EMAIL PROTECTED])

---
Jeff Grossman ([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]




RE: [PHP-DB] Parsing Error

2001-07-07 Thread Larry Rivera

After a brief look it appears that your call to mysql_query is incorrect
" after the query then "," then the link resource

-Original Message-
From: Jeff Grossman [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, July 07, 2001 6:23 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Parsing Error

I keep getting the following error:

Warning: Supplied argument is not a valid MySQL result resource in
/home/httpd/html/stats/jobs/listing.php on line 33

Warning: Supplied argument is not a valid MySQL result resource in
/home/httpd/html/stats/jobs/listing.php on line 43

when I try to display the following webpage.  What am I doing wrong?

http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd";>


Title


West Covina address");
while ($row=mysql_fetch_array($result)) {
$store=$rowid["store"];
$jobdesc=$rowid["jobdesc"];
printf("mailto:[EMAIL PROTECTED]?subject=$store\%20$jobdesc\";>$jobdesc\n");
}
}
mysql_free_result($result);

?>





Thank you,
Jeff
---
Jeff Grossman ([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 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]




Re: [PHP-DB] parsing error // functions

2001-02-04 Thread Marc Bragg

Thanx, will try. Curious: using the Professional PHP Programming book, and got
the other code which didn't work. How is one to know how to move these things
around? Just practice and error?

Can you help with this also, can't get the Generate . . . functions to respond,
such as:
test");
}
?>

is there part missing? or, is this some  run-time compile issue, something that
should have been installed when php was installed?



-- 
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]




Re: [PHP-DB] parsing error

2001-02-03 Thread Jim

Here you go:

Error " . mysql_errno() . ": " . mysql_error() .
"");}
else{echo("Query executed successfully!");}
?>

-Jim

- Original Message -
From: "Marc Bragg" <[EMAIL PROTECTED]>
To: "Jim" <[EMAIL PROTECTED]>
Sent: Saturday, February 03, 2001 4:50 PM
Subject: Re: [PHP-DB] parsing error


> Still having problem:
>
>  if ($result == 0);
> echo ("Error " . mysql_errno() . ": " . mysql_error() . "");
> else if mysql_num_rows($result) == 0{
> echo("Query executed successfully!");
> }
> else:
> ?>
>
> Parse error: parse error in
> /http/www/b/bidattorney.com/public_html/phptest/mysql_test.php3 on line 24
>
>
> ideas?
>
>
>


-- 
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]




Re: [PHP-DB] parsing error

2001-02-03 Thread JJeffman

>  if ($result == 0);
You have a wrong semicolon at the end of the line above.

Jayme.

http://www.conex.com.br/jjeffman



-Mensagem Original-
De: Marc Bragg <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: sábado, 3 de fevereiro de 2001 20:44
Assunto: [PHP-DB] parsing error


> Another strange error, parsing:
>
>  if ($result == 0);
> echo ("Error " . mysql_errno() . ": " . mysql_error() . "");
> elseif (mysql_num_rows($result) == 0);
> echo("Query executed successfully!");
> else:
> ?>
>
> on the 'elseif' statement.
>
> suggestions? is there a parse checker, that identifies errors?
>
>
> --
> 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 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]