RE: [PHP-DB] Help with a JOIN statement

2002-04-19 Thread Robert V. Zwink
tried to use your convention, but I may have missed something. Robert V. Zwink http://www.zwink.net/daid.php -Original Message- From: Michael Robbins [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 4:55 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Help with a JOIN statement I have

RE: [PHP-DB] Selecting Alphabetically

2002-03-22 Thread Robert V. Zwink
In MySQL you can also do this: SELECT * FROM artists WHERE LEFT(title, 1) = 'A' AND LEFT(title, 1) = 'H' ORDER BY title This will return a range of all artists whose title begins with A thru H. Treat the letters like numbers. Robert V. Zwink http://www.zwink.net/daid.php -Original

RE: [PHP-DB] Next birthday?

2002-03-08 Thread Robert V. Zwink
The simple answer might be: SELECT member.* FROM `member` WHERE DAYOFYEAR(member_dob) = DAYOFYEAR(CURDATE()) ORDER BY member_dob DESC LIMIT 1 Seems to work for me. The problem is that it wouldn't support members that have a birthday on the same day :) To solve that I would select the next

RE: [PHP-DB] select and update together

2002-01-21 Thread Robert V. Zwink
http://www.mysql.com/doc/U/P/UPDATE.html UPDATE catalogs SET PROCESSED = Y WHERE PROCESSED IS NULL LIMIT $i,10 Is this what you are looking for? Robert V. Zwink http://www.zwink.net/daid.php -Original Message- From: James Kupernik [mailto:[EMAIL PROTECTED]] Sent: Monday, January 21

RE: [PHP-DB] limit sytax error

2002-01-21 Thread Robert V. Zwink
Looks like LIMIT can only contain one number, when using UPATE the offset parameter cannot be added. http://www.mysql.com/doc/U/P/UPDATE.html UPDATE [LOW_PRIORITY] [IGNORE] tbl_name SET col_name1=expr1, [col_name2=expr2, ...] [WHERE where_definition] [LIMIT #] So . . . UPDATE

RE: [PHP-DB] rewriting the $server_name variable with php?

2002-01-07 Thread Robert V. Zwink
If all of your pages share an include file, then add to the include file something like this: ?php if(strstr($HTTP_HOST, oldhostname.tld)){ header(Location: http://www.newhostname.tld.$PHP_SELF); } ? That way all requests to the old url will be redirected to the new url. You can

RE: [PHP-DB] Convertin Asp to Php

2001-04-24 Thread Robert V. Zwink
There is also a program called asp2php. I'm sure how effective it is. http://asp2php.naken.cc/ You are probably best off rewriting the site. That way you will know exactly what is going on, and can use some of the more advanced features of php. Robert Zwink -Original Message- From:

RE: [PHP-DB] Sure it's simple but.............

2001-03-14 Thread Robert V. Zwink
I don't understand. What is your question? Robert Zwink -Original Message- From: Keith Whyman [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 13, 2001 11:32 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Sure it's simple but. I've got a several links(each with a seperate

RE: [PHP-DB] SHOW COLUMNS

2001-03-14 Thread Robert V. Zwink
Use: echo mysql_field_name($result, $i); Like this: ?php require("Connection.php"); $query="Show Columns from Inventory"; $result= mysql_query($query); while ($row = mysql_fetch_row($result)); { for ($i =1;$imysql_num_fields($result);$i++) //{echo $row[$i]; -- This won't work {echo

RE: [PHP-DB] Using text files instead of a DB

2001-03-14 Thread Robert V. Zwink
ch 14, 2001 12:02 AM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Using text files instead of a DB On 13 Mar 01, at 9:43, Robert V. Zwink wrote: http://phpclasses.upperdesign.com/browse.html/package/52 Thanks for this. Very simple and straightforward, but I don't see much in there that helps

RE: [PHP-DB] Using text files instead of a DB

2001-03-13 Thread Robert V. Zwink
http://phpclasses.upperdesign.com/browse.html/package/52 The above link will take you to a class to manipulate CSV files. This might help you understand file access in php. If you want to maintain a database within a text file using CSV file format may help. If you have specific questions

RE: [PHP-DB] flexible variables

2001-02-20 Thread Robert V. Zwink
In Reply to: Hello all. I have a question. How can i define some flexible variables? You would have to have a method in your object that echoed passed variable names. So it would look like this instead: echo $obj-write(ID); echo $obj-write(TOWN); echo $obj-write(PHONE); Or create an array