Re: [PHP-DB] "Fake" BDD

2003-12-02 Thread Gary Every
Check out SQLite BENARD Jean-philippe wrote: Hi, We use ORACLE DataBase for all our projects and we "can't install" mysql/postgresql on our server. A new project needs a little database (only 1 table). I heard about something like an API in order to use text files in place of real databa

Re: [PHP-DB] multiple queries

2003-12-02 Thread Gary Every
Or do the same with the BETWEEN keyword: SELECT * FROM dates WHERE store='$store' AND date BETWEEN DATE_SUB(now(), interval 3 day) AND DATE_ADD(now(), interval 3 day) Richard Davey wrote: Hello Cameron, Tuesday, December 2, 2003, 1:08:19 AM, you wrote: CS> $sql = "SELECT * from dates where st

RE: [PHP-DB] CREATE TABLE LIKE, error

2003-12-15 Thread Gary Every
Try: CREATE table new_table SELECT * from old_table limit 1; delete from new_table; This will give you the same structure in both tables, and the deletion will make the new_table empty. -Original Message- From: Adam i Agnieszka Gasiorowski FNORD [mailto:[EMAIL PROTECTED] Sent: Monday,

RE: [PHP-DB] PHP export to CSV

2003-12-29 Thread Gary Every
You should try this: Header("Content-Type: text/plain"); Header("Content-Disposition: attachment; filename=file.csv"); Then output the text you want to send. Make sure you double-quote it so that the newlines work! $eol = "\n"; echo "Field 1,Field 2,$field_variable,$eol" .. This sends a st

RE: [PHP-DB] Results with ledger stripes?

2004-01-27 Thread Gary Every
Haven't been following this thread, but here's how we do it: If($bgc == '') { $bgc = "#DD"; } elseif($bgc == "#FF") { $bgc = "#DD"; } else { $bgc = "#FF"; } Gary Every Sr. UNIX Administrator

RE: [PHP-DB] Accessing my variables

2004-02-11 Thread Gary Every
You're missing a ' in your include statement, after .php Gary Every Sr. UNIX Administrator Ingram Entertainment Inc. 2 Ingram Blvd, La Vergne, TN 37089 "Pay It Forward!" -Original Message- From: J. Kevin C. Burton [mailto:[EMAIL PROTECTED] Sent: Wednesday, February

RE: [PHP-DB] How do you make an IN span multiple tables?

2004-03-04 Thread Gary Every
Select * from table1 t1, table2 t2, table3 t3 WHERE ((t1.thread_ref IN (1,2,3,4,5,6,7,8,9,10)) or (t2.thread_ref IN (1,2,3,4,5,6,7,8,9,10)) or (t3.thread_ref IN (1,2,3,4,5,6,7,8,9,10))) Gary Every Sr. UNIX Administrator Ingram Entertainment Inc. 2 Ingram Blvd, La Vergne, TN 37089 "Pay It Fo

RE: [PHP-DB] output formatting question

2004-03-09 Thread Gary Every
) 555-1212 Some other formatting hints for this: $first = ucfirst(strtolower($first)); will give you "John" even if the DB has "JOHN" or "john" Gary Every Sr. UNIX Administrator Ingram Entertainment Inc. 2 Ingram Blvd, La Vergne, TN 37089 "Pay It Forward!" ---

[PHP-DB] Testing - no emails since 11:45 AM 3/23/04

2004-03-23 Thread Gary Every
Testing, have received no emails since 11:45 Gary Every Sr. UNIX Administrator Ingram Entertainment Inc. 2 Ingram Blvd, La Vergne, TN 37089 "Pay It Forward!" -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Re: How to simplify DB creation?

2004-03-23 Thread Gary Every
rt for reverse-engineering XML schema from database * Use Criteria OO query system instead of writing SQL queries * Generated methods to easily & efficiently work with (foreign key) relationships Gary Every Sr. UNIX Administrator Ingram Entertainment Inc. 2 Ingram Blvd, La Vergne, TN 370

RE: [PHP-DB] merging a table from multiple servers

2004-05-07 Thread Gary Every
You could do this: Build a sql statement, then connect to each of the servers and save the results in a variable, $result_1 $result_2 Then do: $result_all = array_merge($result_1,$result_2,...) The result sets have to have identical layouts, though. Gary Every Sr. UNIX Administrator

RE: [PHP-DB] Display mysql query results divided in dynamic numbered pages

2004-05-20 Thread Gary Every
Look at: http://www.phpclasses.org/browse/package/92.html It's a pager class that does: << Previous 1 2 3 4 5 6 7 8 9 10 Next >> Gary Every Sr. UNIX Administrator Ingram Entertainment Inc. 2 Ingram Blvd, La Vergne, TN 37089 "Pay It Forward!" -Original Message

RE: [PHP-DB] Re: datetime update

2004-06-10 Thread Gary Every
Actually it would be: UPDATE table SET dateTime=NOW() WHERE record_id='$the_one_you_want'; Or INSERT INTO table (record_id,dateTime) VALUES ('$the_one_you_want',NOW()); Gary Every Sr. UNIX Administrator Ingram Entertainment Inc. 2 Ingram Blvd, La Vergne, TN 3

RE: [PHP-DB] Re: automatic call reference creation

2004-06-10 Thread Gary Every
call code is $callcode"; You don't need to store the call code, since you can recreate it using the autoincrement, the date field, and str_pad. Of course, if space is not an issue, you could always store the concatenated string into another column. Gary Every Sr. UNIX Administrator Ingra

RE: [PHP-DB] Sample Code

2004-06-15 Thread Gary Every
Here's a quick and easy one though: "SELECT * from your_table WHERE your_date_field BETWEEN '2004-06-01' AND '2004-06-15'"; Gary Every Sr. UNIX Administrator Ingram Entertainment Inc. 2 Ingram Blvd, La Vergne, TN 37089 "Pay It Forward!" -Orig

RE: [PHP-DB] Re: [PHP] update count

2004-06-16 Thread Gary Every
If you aren't using a unique key, you can always use "LIMIT 1" at the end of your query, but unless your ORDERing correctly to get the exact data row you want to update, this can have unexpected results. Gary Every Sr. UNIX Administrator Ingram Entertainment Inc. 2 Ingram Blvd

RE: [PHP-DB] Retrieve data, add new fields and enter it in new table

2004-06-22 Thread Gary Every
e1 that have an associated name in table2 as well as the date (NOW()) It will have no indexes, though, so you could use the ALTER TABLE command after it was created. See : http://dev.mysql.com/doc/mysql/en/CREATE_TABLE.html for more info on the create table syntax Gary Every Sr. UNIX Admin

[PHP-DB] Turning off "Save Password"

2004-07-01 Thread Gary Every
I'm trying to turn off the save password function so that I can do an auth page that refuses to save passwords on the client side. I've tried some JS but it works only in IE, not Netscape. So, I'm looking for a server-side solution to this. Any ideas? Gary Every Sr. UNIX Admin

RE: [PHP-DB] Turning off "Save Password"

2004-07-01 Thread Gary Every
Fixed my own problem. Within the tag, you can use "autocomplete=off" To turn off the prompting or the autocompletion of any field. Apologize for this off-topic post, but I was searching for a non-javascript server-side solution Gary Every Sr. UNIX Administrator Ingram Entertainm

RE: [PHP-DB] Help with search form using multiple fields

2004-07-23 Thread Gary Every
7;) { $last_name = $_POST['last_name']; $sql_start .= "last_name LIKE '%$last_name%' AND "; } ... ## for the rest of the fields // Trim off the last AND $sql = rtrim($sql_start," AND "); And then do the $sql Gary Every Sr. UNIX Admini

RE: [PHP-DB] Re: LAMP

2004-08-03 Thread Gary Every
The answer to that is SPEED. Nothing short of Oracle comes even close Gary Every Sr. UNIX Administrator Ingram Entertainment Inc. 2 Ingram Blvd, La Vergne, TN 37089 "Pay It Forward!" -Original Message- From: Lester Caine [mailto:[EMAIL PROTECTED] Sent: Tuesday, August

RE: [PHP-DB] Text area

2004-08-24 Thread Gary Every
You need to add slashes to your return: Return ""; Or use single quotes: Return ''; Gary Every Sr. UNIX Administrator Ingram Entertainment Inc. 2 Ingram Blvd, La Vergne, TN 37089 "Pay It Forward!" -Original Message- From: Hafidz Abdullah [mailto:[E

RE: [PHP-DB] Please help

2004-09-08 Thread Gary Every
ry, the " " is just putting a space inside the query, and it is valid Gary Every Sr. UNIX Administrator Ingram Entertainment Inc. 2 Ingram Blvd, La Vergne, TN 37089 "Pay It Forward!" -Original Message- From: Stuart Felenstein [mailto:[EMAIL PROTECTED] Sent: Wednesday, S

RE: [PHP-DB] Search page

2004-09-08 Thread Gary Every
K, first off I'm brand new to PHP and databases. So I hope my question isn't stupid or unfitting to the list. Welcome! Only those that don't ask are unfitting I am creating a "search and results" page of, right now 3 fields with more to add. Perhaps not necessary to my question, I have c

RE: [PHP-DB] PHP 5 Error Handling

2004-09-15 Thread Gary Every
a sql statement, etc I assign $line_no = __LINE__ and if an exception gets thrown, the $line_no is captured, and I can use the info to print to the logs or the screen or ... G. Gary Every Sr. UNIX Administrator Ingram Entertainment Inc. 2 Ingram Blvd, La Vergne, TN 37089 "Pay It Forward!"

RE: [PHP-DB] Help needed

2004-10-04 Thread Gary Every
Check to see if your register_globals is set to off in php.ini. If so (likely, since it defaults to that value) you'll need to access your POST and GET variables like this: GET vars: $var = $_GET['var']; POST vars: $var = $_POST['var']; Gary Every Sr. UNIX Administr

RE: [PHP-DB] query

2002-06-04 Thread Gary . Every
Instead of <> use != Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com -Original Message- From: Natividad Castro [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 11:06 AM To:

RE: [PHP-DB] PHP amd MYSQL

2002-06-05 Thread Gary . Every
This will return you to your original page where you can do your select again, and the deleted row won't show up. You may need to pass parameters on the Header line to let original_location.php exactly where you were previously. This would have to be passed either on the url or as a post/ge

RE: [PHP-DB] cookies and Global variables

2002-06-06 Thread Gary . Every
r includes, and make sure that the header info is the first thing sent. Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com -Original Message- From: Dib, Walid (MED, Stagiaire GEMS) [mailt

RE: [PHP-DB] MySQL won't return results to screen.

2002-06-07 Thread Gary . Every
Do you have SELECT permissions for your httpd user on the DB? Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com -Original Message- From: Blaine Dinsmore [mailto:[EMAIL PROTECTED]] Sent: Fr

RE: [PHP-DB] E-mail address verification

2002-06-20 Thread Gary . Every
I do it like this: if (eregi("^[a-z0-9]+([\.%!][_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$", $email)) { list($user, $host) = explode("@", $email); if ( !checkdnsrr($host, "MX") ) return TRUE; } else { return FALSE; } } As you can see, the email

RE: [PHP-DB] Populating multi-select list from mysql

2002-06-21 Thread Gary . Every
Hi all, I'm having problems getting my multi-select list populated from a mysql table. There is a table called categories with 2 columns (id and category). I want to get all the items (category) and list them in the multi-select list box. This is the code I have so far: $sql = "SELECT categor

RE: [PHP-DB] Select a subset?

2002-07-15 Thread Gary . Every
I think the paging function is what you want SELECT * from table limit 0,10 for the first ten records SELECT * from table limit 11,20 for the next ten, etc. Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://access

RE: [PHP-DB] header function

2002-07-16 Thread Gary . Every
You'll have to get rid of ALL html, including the in your code below. Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com -Original Message- From: Mohammad Forouhar-Fard [mailto:[EMAIL P

RE: [PHP-DB] encode/decode

2002-07-24 Thread Gary . Every
x27;variable','ENCODE(variable,variable') which makes the second entry actually a variable that contains "ENCODE($_POST[password], encrypt)" When you try to decode that, you'll get gobble-di-gook! Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "

RE: [PHP-DB] fiscal week??

2002-07-31 Thread Gary . Every
Week (01..53), where Sunday is the first day of the week. Used with '%X' %v Week (01..53), where Monday is the first day of the week. Used with '%x' Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROT

RE: [PHP-DB] securing directory tree and allowing PHP to work

2002-08-20 Thread Gary . Every
Look into the PHP_AUTH_USER variable. It is assigned through basic authentication. Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com -Original Message- From: bmw [mailto:[EMAIL PROTEC

RE: [PHP-DB] Calendar

2002-10-18 Thread Gary . Every
Check out http://www.hotscripts.com and click on PHP, then Calendars Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:gary.every@;ingramentertainment.com http://accessingram.com -Original Message- From: Joran [mailto:joran.sorbo@;

RE: [PHP-DB] real time output

2002-12-17 Thread Gary . Every
Check out the flush() and ob_flush commands on www.php.net Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com -Original Message- From: Art Chevalier [mailto:[EMAIL PROTECTED]] Sent: Tuesday

RE: [PHP-DB] More linking problems but slightly OT

2002-12-19 Thread Gary . Every
Be sure to add http:// to the beginning of your URL, or the browser thinks it is a local URL Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com -Original Message- From: George Pitcher [mai

RE: [PHP-DB] denying access to folders/files

2003-01-09 Thread Gary . Every
Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com This is fine and dandy, but how do I prevent that person from taking the direct link to the file and giving it to someone else? I'm sure

RE: [PHP-DB] Odd browser problem with sessions

2003-01-29 Thread Gary . Every
IE 5.01 has an issue with its basic auth. There is no patch, only an upgrade path Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

RE: [PHP-DB] function needed

2003-01-30 Thread Gary . Every
Use str_replace $FQDN = "www.domain.com" $domain_only = str_replace(array('www.','.com','.mil','.edu','.org','.gov'),'',$FQDN); Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forwar

RE: [PHP-DB] Getting array values into a query

2003-02-10 Thread Gary . Every
= 'blue'; $var2 = 'green'; I'm sure you'll need to tweak it a little, but the secret its the $$foo (with two $ signs) If $foo = 'aname' then $$foo = $aname The get_rowset is a function I've written to symplify my code, it returns rows in an array from

RE: [PHP-DB] Code for drop down lists

2003-02-11 Thread Gary . Every
ving an array from the DB The if $val == $reptmp is to check for whatshould be selected Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com -Original Message- From: Roland Perez [mailto:[EMAIL PROT

RE: [PHP-DB] MySQL problem -- new to PHP

2003-02-13 Thread Gary . Every
If you cut and pasted your code, try to put localhost into quotes as well. Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTEC

RE: [PHP-DB] dump data, and save as a file

2003-02-14 Thread Gary . Every
Header("Content-type: text/plain"); Header("Content-Disposition: attachment; filename=topsellers_dvd.csv"); Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com Hi everyone, I wan

RE: [PHP-DB] Newbie Question - PHP and MSACCESS

2003-02-17 Thread Gary . Every
//Place your request into a variable: $result = odbc_do($connection,"select * from events where id=$id"); $var = odbc_fetch_row($result); // Now you have an array to work on foreach($var as $line){ //Do your formatting thusly: echo ' ' . $line[0] . '

RE: [PHP-DB] Question concerning hostnames

2003-02-26 Thread Gary . Every
www.pageone.com The effect is that the browser holds pageone, but the url is pagetwo. Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com -Original Message- From: 2b4ever php [mailto:[EMAIL PROTE

RE: [PHP-DB] Update errors

2003-02-27 Thread Gary . Every
Shouldn't have a comma after cat_name = '$cat_name' unless you are updating multiple fields. Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com -Original Message- From: Al

RE: [PHP-DB] Processing Page

2003-02-27 Thread Gary . Every
rs to display the page. Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com -Original Message- From: Aspire Something [mailto:[EMAIL PROTECTED] Sent: Thursday, February 27, 2003 1:49 PM To: [EMAIL PRO

RE: [PHP-DB] Column Sort Question

2003-03-05 Thread Gary . Every
Shouldn't you be using $_GET or, since register_globals are set to off, $order_by should contain "FIRSTNAME" Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com -Original Message

RE: [PHP-DB] Login and link back...

2003-03-19 Thread Gary . Every
7;){ update_logged_in_status($PHP_AUTH_USER,'Y'); if ($redirect!='y') auth_header($PHP_AUTH_REALM); } else { log_it(LOG_INFO,"checkauth() SUCCESS: user=$PHP_AUTH_USER pass=NO-SOUP-FOR-YOU-TOO"); # update_logged_

RE: [PHP-DB] SELECT * FROM Command *REVISED*

2003-03-19 Thread Gary . Every
SELECT * FROM tablename WHERE zipcode='$zipcode' ORDER BY entered_date; Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com > -Original Message- > From: Michelle Whelan [mailt

[PHP-DB] Anybody out there?

2003-04-03 Thread Gary . Every
Is the list active? I've seen nothing all day. Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com

RE: [PHP-DB] Permission Denied; Upload

2003-04-04 Thread Gary . Every
Unable to open '' for reading: That means you're not actually sending a filename to be read! > > I get this error during test of the above page: Warning: > Unable to open '' for reading: Permission denied in > C:\SammiWWW\entry.php on line 27 Couldn't copy the file! > >

RE: [PHP-DB] Calling Stored Procedures of Oracle in php

2003-06-06 Thread Gary . Every
If this is a cut-n-paste of the code, check the line below for spelling: "begin prcoedurename('[EMAIL PROTECTED]','3');end;"; ^^^ Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] h

RE: [PHP-DB] Array Question

2003-06-03 Thread Gary . Every
CartArray['itemid'] = $itemid; where $qty = CartArray['qty']; Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com > -Original Message- > From: Boa Constructor [mai

RE: [PHP-DB] Array Question

2003-06-03 Thread Gary . Every
meric subs for, say, shopping cart id's or something as well: $CartArray['userid1']['itemid']="1"; $CartArray['userid1']['qty']="24"; $CartArray['userid2']['itemid']="2"; $CartArray['userid2&#x

[PHP-DB] Test

2003-06-04 Thread Gary . Every
Sorry about the test, but . . .

RE: [PHP-DB] Datetime help in an INSERT...

2003-06-05 Thread Gary . Every
1. Change your field name from date to something like datefield (or backtick it) 2. Place single quotes within your VALUES parens, e.g. $denylog = "INSERT INTO deny (account, td, datefield ) VALUES ('$tmp', '$td', NOW() )" Gary Every Sr. UNIX Administrator Ingra

RE: [PHP-DB] Ignoring specific values in an inner join query?

2003-06-10 Thread Gary . Every
.Name like '%$name%' AND whatever_field_you_want IS NOT NULL AND whatever_other_field IS NOT NULL"; Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com > -Original Message

RE: [PHP-DB] Problems with formvalues by using Suse 8.2

2003-06-19 Thread Gary . Every
the $$key assigns whatever $key is to a variable with that value, e.g. $key = "sid"; $value = "W"; So: $$key = $value; will make the following true: $sid == "W"; It's a pretty good way of re-doing pages that were written with register_globals=on to run with

RE: [PHP-DB] Two-column display of data, second method

2003-06-20 Thread Gary . Every
just by changing the $cols_wanted variable Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com > -Original Message- > From: Becoming Digital [mailto:[EMAIL PROTECTED] > Sent: Thursday, June

RE: [PHP-DB] Limit return Size

2003-06-20 Thread Gary . Every
Or $sql = "SELECT concat(LEFT(columnName,255),"...") FROM tableName"; Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com > -Original Message- > From: Hutchins, Rich

RE: [PHP-DB] md5 question!

2003-06-24 Thread Gary . Every
hat two users with the same password may have completely different hash strings. Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL

RE: [PHP-DB] Splitting Product Catalogue Over Multiple Pages?

2003-06-27 Thread Gary . Every
t; at the end of the sql statement. Don't worry about the values in the column, just the amount of records you want to return Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com > -Orig

RE: [PHP-DB] Splitting Product Catalogue Over Multiple Pages?

2003-06-27 Thread Gary . Every
20,10 it will return 10 records starting at record 20. More info at http://www.mysql.com/doc/en/SELECT.html Search for limit on that page. Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com >

RE: [PHP-DB] Reading from a file

2003-07-01 Thread Gary . Every
Looks like the first question was answered correctly, for the second one look at the ltrim and rtrim functions. $var = ""; $var = rtrim($var); echo ":$var:"; output is :: Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward

RE: [PHP-DB] HEAP table

2003-07-08 Thread Gary . Every
Create a create_date table with one record, one or two fields, and put the last refreshed time/date in it. If that's expired, refresh Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com > ---

RE: [PHP-DB] mysql_fetch_array issues.

2003-07-09 Thread Gary . Every
Do you have select permissions on that DB/table? If you have GRANT permissions, try GRANS SELECT, INSERT, UPDATE, DELETE ON db.tablename to 'youruser'@'your.ip.address' IDENTIFIED BY 'yourpassword'; your.ip.address can be substituted with localhost if you'

RE: [PHP-DB] Date problem

2003-07-14 Thread Gary . Every
> // Do some number crunching here // > > $newnow = $now-$numweeks; > > echo $now; > > $converted_date = date("d-m-y",$now); > > echo "$converted_date"; You should be running your $convewrted_date on $newnow, not $now Gary Every Sr. UN

RE: [PHP-DB] commas

2003-07-17 Thread Gary . Every
Check out the php function number_format($field,0) Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com > -Original Message- > From: Chris Mach [mailto:[EMAIL PROTECTED] > Sent: Thursd

RE: [PHP-DB] Condition for Adding data

2003-07-22 Thread Gary . Every
Well, you're initializing $food to ""; then testing to see if it has a value, which it never will. If you're getting the $food variable from a POST or a GET op, you'll need to grab it from the appropriate array, $food = $_POST['food']; echo $food; to see wha

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

2003-08-14 Thread Gary . Every
Youy could use: if(!$result) { // Don't display } else { echo "Title"; } You fill in the blanks Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com > -Original Message--

RE: [PHP-DB] Selection problem

2003-09-08 Thread Gary . Every
Try unset after the if statement if ($nameb == ""){ $query = "SELECT * FROM recipes WHERE points $pointsb"; } else { $query = "SELECT * FROM recipes WHERE name = '$nameb'"; $new_nameb = $nameb; unset($nameb); } Gary Every Sr. UNIX Admi

RE: [PHP-DB] Re: UPDATE part of a column

2003-09-23 Thread Gary . Every
The best way to do this is a text field, NOT a textarea, and if need be, use multiple fields. A textarea, by look and definition is inviting carriage returns to be used. Limit the users to the input you want, and remember, GIGO (garbage in, garbage out) Gary Every Sr. UNIX Administrator Ingram

RE: [PHP-DB] mySQL vs pgSQL | php vs others

2003-09-24 Thread Gary . Every
> > > El Mié 24 Sep 2003 07:24, nabil escribió: > > Dear all; > > > > I have been using Mysql for a long time, but I have a benchmark Q. > > > > Is pgsql , better ? faster ? more reliable than mysql ? > > Maybe not faster in FTS, but surely MORE reliable!!! > > > any comment ? > > Some people

RE: [PHP-DB] show list of values and new values

2003-10-01 Thread Gary . Every
e select_id='1'. You can use the same table with different select_id's for different dropdowns. Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com > -Original Message- > From

RE: [PHP-DB] Round a number

2003-10-03 Thread Gary . Every
Try the rtrim function in php Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com > -Original Message- > From: Shaun [mailto:[EMAIL PROTECTED] > Sent: Friday, October 03, 2003 10

RE: [PHP-DB] Help installing phpmysearch

2003-10-29 Thread Gary Every
But do you have php compiled --with-curl? check phpinfo(); Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com > -Original Message- > From: Joseph Allard [mailto:[EMAIL PROTECTED]

RE: [PHP-DB] Page counter from a query ?

2003-11-03 Thread Gary Every
ript $lim = $page[$pagid] // which would equal "0,10" $sql = "SELECT columns from table limit $lim"; and so on . .. Does that help? Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessin

RE: [PHP-DB] Re: Page counter from a query ?

2003-11-04 Thread Gary Every
Just do an extract on your $_GET var (if security concerns are negligible) Say you get line is: ?sid=123&form=12 // Execute this extract($_GET) // You end up with: $sid == "123"; $form == "12"; Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "

RE: [PHP-DB] form not working...

2003-11-10 Thread Gary Every
Don't you need to start your form BEFORE your 's -Original Message- From: jas [mailto:[EMAIL PROTECTED] Sent: Monday, November 10, 2003 11:38 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] form not working... For some reason my form to edit selected items is not working, I think I need a new

RE: [PHP-DB] What wrong with my Query??

2005-03-25 Thread Gary Every
27;,'$password','$datetoday' ,'$datetoday','$expirydate','123.123.123.123')"; Gary Every Sr. UNIX Administrator Ingram Entertainment Inc. 2 Ingram Blvd, La Vergne, TN 37089 "Pay It Forward!" -Original Message- From: HarryG

RE: [PHP-DB] adodb is slow

2005-05-23 Thread Gary Every
pare it down to your needs, but it's really a cure-all when what you need is an abstraction layer that works for YOUR needs! Don't be afraid to try slimming it down, but I'd keep an original copy somewhere in case you find that your paring knife was a little too sharp!! G.~ Gary

RE: [PHP-DB] PHP 4 to 5 Upgrade Issue

2005-06-23 Thread Gary Every
I need to compare PHP 4 code with PHP 5 interpreter on same machine. I am following the examples in Adam Trachtenberg's Upgrading to PHP 5 (O'Reilly 2004) listed in "Appendix C: Installing PHP 5 Alongside PHP 4" with regard to using virtual hosting and relative ports on Apache httpd. I have also r