RE: [PHP-DB] Don't know why query works this way

2003-08-11 Thread Adam Alkins
ry you would call db_fetch and use it > like: > > > $someResult = db_fetch($someQuery); > > If you needed to return an array you would use it with a while or for > statement like: > > While ($someResult = db_fetch($someQuery)) { > > } > > If you needed to

RE: [PHP-DB] determining if a query returns no value

2003-08-08 Thread Adam Alkins
Quoting [EMAIL PROTECTED]: > Youy could use: > if(!$result) { > // Don't display > } else { > echo "Title"; > } > > You fill in the blanks That only checks to see the query failed. A query returning no rows doesn't fail... -- Adam Alkins http

Re: [PHP-DB] Limit

2003-08-04 Thread Adam Alkins
If it is a unix timestamp, why not just select rows where the date is >= 7776000 (which is 90 days) or if you want to be specific about the months, use mktime() to generate the timestamp for the date 3 months ago. -- Adam Alkins http://www.rasadam.com Quoting Marie Osypian <[EMAIL PRO

Re: [PHP-DB] Mysql vs postgresql

2002-09-24 Thread Adam Alkins
old but I think a lot still applies http://www.phpbuilder.com/columns/tim2705.php3 -- Adam Alkins http://www.rasadam.com --

Re: [PHP-DB] has anyone used php to connect to access ?

2002-07-24 Thread Adam Alkins
http://www.php.net/manual/en/ref.odbc.php ------ Adam Alkins http://www.rasadam.com -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Keeps prompting to download php page???

2002-07-16 Thread Adam Alkins
Wrong list. This is for Databases. Try the php-install list. -- Adam Alkins http://www.rasadam.com -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Select a subset?

2002-07-14 Thread Adam Alkins
of rows in a query, so if you only selected 10 rows, it will return 10. If you want to count all the rows in the table, its best to use the COUNT() function SELECT COUNT(*) FROM table -- Adam Alkins http://www.rasadam.com -- -- PHP Database Mailing List (http://www.p

Re: [PHP-DB] extract data from database into an array

2002-07-13 Thread Adam Alkins
ysql_fetch_assoc) or numeric (mysql_fetch_row). And simply if selecting multiple rows, use a loop while($data = mysql_fetch_array())... -- Adam Alkins http://www.rasadam.com -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Re: HELP NEEDED!

2002-07-13 Thread Adam Alkins
{ do_user_exists_stuff(); } -- Adam Alkins http://www.rasadam.com -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] PHP Security and Code Design

2002-07-10 Thread Adam Alkins
> Anybody working with register globals off already that can clear this up? Yes. URL passed variables are access via the GET method. So page.php?foo=bar is accessed by $_GET['foo'] -- Adam Alkins http://www.rasadam.com -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] catch warnings?

2002-07-10 Thread Adam Alkins
rity 16) > > How can I catch these warnings in PHP? I believe mssql_get_last_message() is what you want. -- Adam Alkins http://www.rasadam.com -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] A Simple Question

2002-07-09 Thread Adam Alkins
graded to that version or greater, but there are always the late ones. Good reading: http://www.php.net/manual/en/language.variables.predefined.php -- Adam Alkins http://www.rasadam.com -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] PHP tags in a MySQL echo

2002-04-09 Thread Adam Alkins
Hello Everyone, I'm currently working on a simple template system, where, all the html and few php tags are called from a database so I can easily update the site content via a form, e.t.c., that works fine. However, when I echo the text, the html/php, the php tags to not process. I figure the