Re: [PHP-DB] NLP to SQL queries

2005-02-08 Thread J R
http://pear.php.net/manual/en/package.database.php good luck On Mon, 7 Feb 2005 17:09:22 +, Jonathan Trepczyk <[EMAIL PROTECTED]> wrote: > hiya guys, just trying to find the best way of translating natural > language queries to sql queries to put in a website, i will be glad if > you can help

[suspicious - maybe spam] [PHP-DB] [suspicious - maybe spam] Re: [PHP-DB] Reg Exp to change c:\dir\dir\pic.jpg to dir/pic.jpg - to upload image path

2005-02-09 Thread J R
hi you don't have to bother your self of such things. html does it all for you. All you have to do is manage the uploaded file which is put as a temporary file on the server temporary folder. Here's some tip: temporary file in your server: $_FILES["file"]["tmp_name"] name of your file (the upload

Re: [PHP-DB] Reg Exp to change c:\dir\dir\pic.jpg to dir/pic.jpg - to upload image path

2005-02-10 Thread J R
now if you must have the local path of your file here's a rough code to give you an idea using javascript, then just have it php control it on the server side. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] PHPSESSID how to append and access

2006-05-25 Thread J R
On 5/25/06, Girish Agarwal <[EMAIL PROTECTED]> wrote: Hi All, I am using header("Location: http://dv-medical/phpscripts/test.php";) function to hop from one Page to Another in My Web Application My Problem is I have been unable to get the exact syntax to append the Session ID to

Re: [PHP-DB] Question in js about frameset rows

2006-06-21 Thread J R
appologies to the list. i think this should not be asked here. anyway i'll answer. IMHO, there is no easy way to do what you like. what i would suggest is use "document.write()" or inclosing your frameset in a container "" then dynamically change it using "innerHTML" hth On 6/21/06, suad <[EMAI

Re: [PHP-DB] Conditional updating...

2006-06-27 Thread J R
try this one. just pass for $_value an array with your table fieldname as your key function constructUpdate( $_tbl_name, $_where, $_values ) { $valstr = ''; $firstval = false; if (is_array($_values)) { foreach( $_values as $key=>$val ) { if ($

Re: [PHP-DB] Uploading multiple files?

2006-07-04 Thread J R
got curious of evans question. is there a way whithout having multiple "" form to upload multiple files. only one input field but when browse is click and the file selection window poped, multiple files can be selected at once and then uploaded. thanks. john On 7/4/06, Bastien Koert <[EMAIL PRO

Re: [PHP-DB] Uploading multiple files?

2006-07-04 Thread J R
k thanks chris. guesse we need to wait for more browser to support it. for now its good as it can't be done. On 7/5/06, Chris <[EMAIL PROTECTED]> wrote: J R wrote: > got curious of evans question. is there a way whithout having multiple > "" form to upload mul

Re: [PHP-DB] Direct Access to an Array Item?

2006-08-09 Thread J R
On 8/9/06, Peter Beckman <[EMAIL PROTECTED]> wrote: I want to access a variable within a function-returned array without setting the array to a variable first. Example -- test for equal to string 'foo' on the 4th element of a returned fetch row: if (($row = mysql_fetch_row($result))[3] ==

[PHP-DB] Direct Access to an Array Item?

2006-08-09 Thread J R
On 8/9/06, Peter Beckman <[EMAIL PROTECTED]> wrote: I want to access a variable within a function-returned array without setting the array to a variable first. Example -- test for equal to string 'foo' on the 4th element of a returned fetch row: if (($row = mysql_fetch_row($result))[3] ==

Re: [PHP-DB] Distinct Partial Matches: RegExp

2006-08-30 Thread J R
i'm a bit confused. if i'm getting you right heres my 2 cents: first you do sql query using DISTINCT when the result are returned to you, you can then run thru the result array using preg_replace. heres an example: $aVar= array( 'animal-dog-5', 'animal-dog-3', 'animal-c

Re: [PHP-DB] Distinct Partial Matches: RegExp

2006-08-30 Thread J R
ther servers too, but that's not the same as regular expression replacement like you can do with PHP.. It just returns a boolean true/false depending on whether or not the match works. -Micah J R wrote: > i'm a bit confused. if i'm getting you right heres my 2 cents: > &g

Re: [PHP-DB] month

2006-10-15 Thread J R
search the archive. On 10/16/06, Ron Piggott (PHP) <[EMAIL PROTECTED]> wrote: I have completely missed it and need to try again. -- GMail Rocks!!!

Re: [PHP-DB] Generating pages with full stories

2006-11-13 Thread J R
Here's how you should do this (IMHO): On you front page make a sql query say you want to display the latest 3 events. Your query probably will look like this: select event_table_id, title from event_table order by date_created desc limit 3; then from the result make a while or for loop (for exa

Re: [PHP-DB] retaining form information when someone presses back

2007-01-01 Thread J R
try using: header ("Cache-control: private"); i'm not sure that will work, try playing with header cache-control. anyway as Bastien metioned it is better to have your form redisplayed with values the user entered when validation failed rather than asking the user to cli

Re: [PHP-DB] Searching many-to-many map tables

2007-02-07 Thread J R
you must have three tables user (have at least user_id field) group (have at least groupd_id field) user_group (have 2 fields: user_id and group_id, you can also have user_group_id - depends on your need) /* if you only need the user id */ select user_id from user_group where group_id in (1,2);