Re: [PHP-DB] Page refresh and database updation

2006-09-26 Thread RaJeSh VeNkAtA
Hi, one thing u can do is u can have a primary key the table you are inserting so that duplication wont be done. If thats not possible redirect the page to the results page after updating the post data than showing him the results in the action page ( action i mean where the form action has

Re: [PHP-DB] Future Event

2006-02-20 Thread RaJeSh VeNkAtA
On Mon, 20 Feb 2006, Mark Bomgardner wrote: Is there a way in php to execute a SELECT statement in the future? What I am wanting to do is use a page to parse a database at a future time. I want to send out some email about an event I am putting on, but I don't want to execute the select

Re: [PHP-DB] general rule for when to perform an operation in either Mysql or php

2006-01-29 Thread RaJeSh VeNkAtA
i think its best to use php when both can perform the same opreration :). there will less stress on server when u use php than mysql . raj On Sun, 29 Jan 2006, daniel smith wrote: I am playing around with Mysql and php and I am not sure about when it is best do something in mysql or php when

Re: [PHP-DB] is this possible in one query?

2006-01-14 Thread RaJeSh VeNkAtA
u can have the query as $query = select * from $table where nameId = 31 ; $result = mysql_query ( $query ) ; $i = 0 ; while ( $row = mysql_fetch_array( $result , MYSQL_NUM ) ) { $array[$i][0] = $row[0] ; $array[$i][1] = $row[1] ; $array[$i][2] = $row[2] ;

RE: [PHP-DB] If syntax

2005-10-02 Thread RaJeSh VeNkAtA
think this is wrong ... as it gives unique alias even if the query is not executed .. rajesh On Sun, 2 Oct 2005, Bastien Koert wrote: you need to check the num of rows returned, since the query always(if it works) returns true $result = mysql_query($query); if

Re: [PHP-DB] If syntax

2005-10-01 Thread RaJeSh VeNkAtA
i think for unique alias u have keep alias='$alias' ?? and also if statement will always be true as the mysql statement is always correct and will be executed . U have to check the result of query for whether there r ne aliases or not ... On Sat, 1 Oct 2005, Ron Piggott wrote: Take a

Re: [PHP-DB] session confusion| can anyone help?

2005-08-25 Thread RaJeSh VeNkAtA
session_start() should be given at the starting of the file before others u can include anthing after the session_satrt() functon only On Fri, 26 Aug 2005, bo wrote: here is the code for accesscontrol.php which control the access to protected page, the server gives an error as of Notice:

Re: [PHP-DB] Current web page being displayed

2005-08-06 Thread RaJeSh VeNkAtA
hai .. if u r seeing http://www.google.com/blog/myblog.php then $_SERVER[SERVER_NAME] would give u www.google.com and $_SERVER[PHP_SELF] would give u /blog/myblog.php for details just print the array $_SERVER and see it .. On Sat, 6 Aug 2005, Ron Piggott wrote: