Re: [PHP-DB] Supplied argument is not a valid MySQL result resource...

2001-04-21 Thread Klaus Haberkorn

Looks like many reasons cause this error-message,
but I cannot find a problem in the Query:
ie.:
 $db_handle = mysql_connect("localhost", "mysql", "mysql");
 if($db_handle)
 {
  $result = mysql_db_query("mysql", "select * from user", $db_handle);
  if($result = TRUE)
  {
   $row = mysql_num_rows($result);
()
The same simplified statement works fine in the Win32-client-tool,
connected as the same user.
The table "user" exists and "mysql" has any privileges from localhost and %
in "user" and "db"
I surely made some experiments with Caps or not.
I built a new apache 1.3.12 with a static php4.0.4pl1 module and
mysql-support.
Runs fine, but the problem is the same.
I have no more idea...

"Johannes Janson" [EMAIL PROTECTED] schrieb in im Newsbeitrag:
9bhkqv$aai$[EMAIL PROTECTED]
 Hi,

 i don't get that.
 Examlpe: tablename: test , entry: id 001; name: John Doe

 $result = mysql_query("SELECT * FROM test");
 $row = mysql_fetch_whatever($result); // everything ok


 $result = mysql_query("SELECT * FROM tet");
 $row = mysql_fetch_wahtever($result); // Warning: Supplied arggument is
not
 a valid 

 $result = mysql_query("SELECT nonexistent FROM test");
 $row = mysql_fetch_whatever($result); // Warning: Supplied argument is not
 

 $result = mysql_query("SELECT * FROM test WHERE id='002'");
 $row = mysql_fetch_whatever($result); // no errormsg, $result=true but
empty

 That's what I get. So there must be something wrong with the query.

 Johannes


 ""Klaus Haberkorn"" [EMAIL PROTECTED] schrieb im Newsbeitrag
 9bhh1c$2gg$[EMAIL PROTECTED]">news:9bhh1c$2gg$[EMAIL PROTECTED]...
  thank You, Johannes,
  but I think we can skip this,
  we reduced the query statement to the most simple one:
  "SELECT * FROM {tablename}"
  if the tablename is wrong, then another error message is issued.
  the result is not treated by a while-loop but just by fetch_num_rows,
  which at least reports the error.
  (and, by the way, the same script runs on another system)
  so we are more looking for problems with apache versions
  and/or modules.
  we also checked access-rights, but this also causes different errors.
  any other idea?
 




 --
 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] Values for Popdownmenu (Categorie and Subcategorie) from MySQL

2001-04-21 Thread olinux

if you want to got the jscript route, try something like this
http://www.a1javascripts.com/site_navigation/doublecombo/doublecombo.html

then just figure how you want to insert the variables. shouldn't be too
hard, just match things up from the working script to the new one.

olinux


- Original Message -
From: "Denis Mettler" [EMAIL PROTECTED]
 Hi there,

 I would like to create a form which gets it's values out of a Database and
2
 Tables:

 MainCat:
 MC_ID
 MC_Name

 SubCat:
 SC_ID
 MC_ID
 SC_Name

 I know how i can fill the values in the first popdownmenu,
 but i don't know how to handle the second one withe the chosen
 value from the first.

 Can anybody help me?

 --
 Best Regards / Beste Gruesse
 Denis Mettler
 http://www.denis-mettler.de


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


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

2001-04-21 Thread Bart A. Verbeek

Hello,

I'm internet-databasing for over a year now and only used MySQL up untill
now.
Last week I spoke with a guy that was interested in running Interbase on a
Unix-webserver,
so I've got a couple of questions...

1. Can interbase be installed and run on every Unix-type (BSD)?
I've taken a look on the borland site but they only speak of Linux and
windows.
2. How stable is it comparing to MySQL when running on Unix (bsd)?
3. Is it possible to run MySQL and Interbase on the same server?
4. What are the differences between Interbase and MySQL?
5. Does PHP have the same capabilities for Interbase as for MySQL?
6. How difficult is it to install a binary (not found on Borland site) or
to compile it from source for a BSD-server?
7. What's the difference between managing Interbase and managing MySQL on a
Internetserver?
8. Does anyone know hostingproviders that support Interbase?
9. Why would anyone choose Interbase when they can use MySQL on the same
server?

I hope anyone can help me!

Thanks in advance...
Regards,

Bart Verbeek


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

2001-04-21 Thread Sharmad Naik

I wanted to learn OOP in PHP .I m using postgresql and have a table called 
price containing the price_of_recycle of an object (0th row for bottle,
1st row for create and 2nd row for cans).I wanted to write an OOPS 
PHP program that would extract the price from the database for the individual
object and multiply it to the number of object send to recycle by any person at
the browser and display the output
I m currently using Professional PHP to refer but couldn't grap much 
out of it.Pls help me.

-Thanks

-- 
The secret of the universe is @*!'^#+ NO CARRIER
___  _  _  _
|_|_||_||_||\/||_|| \
_|| || || \|  || ||_/

-- 
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] super simple....... but!

2001-04-21 Thread Francois Boucher

I wrote this code but nothing append.  If i look de code in the browser it's
stopping to starting!

What is the problème?


HTMLBODY
?php
echo "starting...";
if ( mysql_connect("localhost","php","php") )
  { echo "ok"; }
else
echo "error!";

?
/BODY/HTML

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-=   François Boucher  =-
-=  [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] Loading jpg (etc)

2001-04-21 Thread Johannes Janson

Hi,

why storing the pictures in the db. just store the link to
it.

just a thought
Johannes

"Sharmad Naik" [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,
 I wanted to know how to store and retrive images like jpeg,bmp from
 database.I have a table called member with mem_id and photo.
 Pls instruct how to do it
 I m using postgresql but any reference would do

 --
 The secret of the universe is @*í!'ñ^#+ NO CARRIER
 ___  _  _  _
 |_|_||_||_||\/||_|| \
 _|| || || \|  || ||_/

 --
 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] super simple....... but!

2001-04-21 Thread olinux

 mysql_connect returns a positive MySQL link identifier on success, or an
error message on failure.
You are testing for True/False
a better way to do your test would be

$link = mysql_connect (localhost, username, password) or die (Could
not connect);
print (Connection successful!);

olinux

- Original Message -
From: Francois Boucher [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, April 21, 2001 1:34 PM
Subject: [PHP-DB] super simple... but!


 I wrote this code but nothing append.  If i look de code in the browser
it's
 stopping to starting!

 What is the problème?


 HTMLBODY
 ?php
 echo starting...;
 if ( mysql_connect(localhost,php,php) )
   { echo ok; }
 else
 echo error!;

 ?
 /BODY/HTML

 --
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 -=   François Boucher  =-
 -=  [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]


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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