Date: 11/29/99
- Next message: Bob Bowker: "Re: SV: SV: RE: [PHPLIB] I can't keep the PHPLIB-"cookie""
- Previous message: lanyzz <email protected>: "[PHPLIB] THIS WEEKEND"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
since i am still quite new and unexperienced using the phplib i now have the
problem to query my mysql db.
i have already figured out how to connect to my db but that's it i don't get the
requested data out of the db.
using "plain php and mysql" i would have done this:
[...]
<!--content starts here-->
<script language="php">
mysql_connect($host,$user,$dbpasswd);
$query_id = mysql_db_query("$db","select * from $table where art_id = '1'");
$result = mysql_fetch_array($query_id);
$art_id = $result[art_id];
$title = $result[art_title];
$content = $result[art_content];
$author = $result[art_author];
$created = $result[art_created];
$updated = $result[art_updated];
$show = $result[art_show];
mysql_close();
</script>
<P><FONT CLASS="title"><script
language="php">print("$title");</script></FONT></P>
<P><FONT CLASS="normal"><script
language="php">print("$content");</script></P>
<!--content ends here-->
[...]
which works fine but using classes seems to be the better and more flexible way
doing db queries. i tried half a day yesterday to make a db query with the
phplib which should do what the above code does and i couldn't manage to get
there. maybe i don't understand the logic of classes at the moment because i
have never worked with classes before.
so, if someone could lead me into the right direction of what i want to achieve
with the code shown above i would really appreciate it.
many thanks in advance,
andreas
----------
Andreas Otto
NoHo Digital Ltd,
Floor 2, Canberra House,
315 -317 Regent Street
London W1R 7YB
Reception 0171 299 3434
Fax 0171 631 5050
http://www.noho.co.uk
-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.
- Next message: Bob Bowker: "Re: SV: SV: RE: [PHPLIB] I can't keep the PHPLIB-"cookie""
- Previous message: lanyzz <email protected>: "[PHPLIB] THIS WEEKEND"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

