Re: [PHP-DB] Help with If else if

2012-03-18 Thread Tamara Temple
On Tue, 13 Mar 2012 21:23:57 +0530, Gu®u sent: No Michael, your code is also not working. What you have understood is correct. let me explain it to others too. If variable twitter and facebook are empty don't echo anything, if variable twitter has a value and facebook is empty echo out only t

Re: [PHP-DB] Help with If else if

2012-03-18 Thread Tamara Temple
On Tue, 13 Mar 2012 17:33:43 +0530, Gu®u sent: Hi, Please help me with this code. I have 2 different fields in mysql table. What I want is if the field is empty don't show the image. Please look at the code below. plugin->ListViewValue()=="") { echo ''; }

Re: [PHP-DB] Help with If else if

2012-03-13 Thread Gu®u
I tried the below code too considering may be the localhost is really dumb and we need to tell each and every condition. But still its not working :( $tweet = $search->plugin->ListViewValue(); $fb = $search->facebook->ListViewValue(); if($tweet=="" && $fb=="")

Re: [PHP-DB] Help with If else if

2012-03-13 Thread Matijn Woudt
On Tue, Mar 13, 2012 at 4:53 PM, Gu®u wrote: > No Michael, your code is also not working. What you have understood is > correct. let me explain it to others too. > > If variable twitter and facebook are empty don't echo anything, > > if variable twitter has a value and facebook is empty echo out o

Re: [PHP-DB] Help with If else if

2012-03-13 Thread Michael Stowe
Hmm, what happens with the code I sent you? Just tested it on my end and worked exactly as expected. Try doing a var_dump($search->plugin->ListViewValue(), $search->facebook->ListViewValue()); to make sure the data being returned is what's expected... you should be getting string(0) "" returned f

Re: [PHP-DB] Help with If else if

2012-03-13 Thread Gu®u
No Michael, your code is also not working. What you have understood is correct. let me explain it to others too. If variable twitter and facebook are empty don't echo anything, if variable twitter has a value and facebook is empty echo out only twitter, if variable twitter has no value and faceb

Re: [PHP-DB] Help with If else if

2012-03-13 Thread Michael Stowe
>From looking at your code, the issue is that your if statements are checking for the same criteria as your else statements, meaning that if the string is empty ("") the if statements will be triggered, and since the if statements are true, the elseif statement will not be. Or if the string isn't

Re: [PHP-DB] Help with If else if

2012-03-13 Thread Matijn Woudt
On Tue, Mar 13, 2012 at 3:06 PM, Gu®u wrote: > The issue is both the images are echoing and no if else statement is > working. > First of all, please bottom post on this (and probably any) mailing list. You should perhaps provide what the contents of $search->plugin->ListViewValue()=="" and $sea

Re: [PHP-DB] Help with If else if

2012-03-13 Thread Gu®u
The issue is both the images are echoing and no if else statement is working. On Tue, Mar 13, 2012 at 7:22 PM, Matijn Woudt wrote: > On Tue, Mar 13, 2012 at 1:03 PM, Gu®u wrote: > > Hi, > > > > Please help me with this code. I have 2 different fields in mysql table. > > What I want is if the fi

Re: [PHP-DB] Help with If else if

2012-03-13 Thread Matijn Woudt
On Tue, Mar 13, 2012 at 1:03 PM, Gu®u wrote: > Hi, > > Please help me with this code. I have 2 different fields in mysql table. > What I want is if the field is empty don't show the image. Please look at > the code below. I have looked at it. Maybe you should tell what is wrong, what it outputs

Re: [PHP-DB] Help with mysql data sorting using php

2010-05-17 Thread kesavan trichy rengarajan
take a look at this: http://datatables.net/examples/data_sources/server_side.html On Mon, May 17, 2010 at 5:30 PM, nagendra prasad wrote: > Hi Artur, > > I am a beginner to this stuff. So, If you or anyone can give me some > example > codes or may be some links for my reference that would be a gr

Re: [PHP-DB] Help with mysql data sorting using php

2010-05-17 Thread nagendra prasad
Hi Artur, I am a beginner to this stuff. So, If you or anyone can give me some example codes or may be some links for my reference that would be a great help. Best, Guru. On Mon, May 17, 2010 at 12:57 PM, Artur Ejsmont wrote: > Hehe. Then a method: ) just make a query builder method like 'findS

Re: [PHP-DB] Help with mysql data sorting using php

2010-05-17 Thread Artur Ejsmont
Hehe. Then a method: ) just make a query builder method like 'findSongs' with all the params ( optional or mandatory ) like page, limit, sortby, filters etc. then inside build SQL based on args. Just be careful - SQL injection is your enemy here. From app pass all the args from get/ post and that'

Re: [PHP-DB] Help with mysql data sorting using php

2010-05-17 Thread nagendra prasad
DB is like more then 500MB and it will grow day by day :) On Mon, May 17, 2010 at 12:46 PM, Artur Ejsmont wrote: > If the DB is very small use tablesorter plugin of jquery. Otherwise > custumizable query method. > > On 17 May 2010 07:56, "nagendra prasad" wrote: > > Hi All, > > I have a datab

Re: [PHP-DB] Help with Web services (facebook, myspace)

2009-01-23 Thread Ruprecht Helms
Abah Joseph wrote: > I just saw something on pear.net > http://pear.php.net/package/Services_Facebookmaybe it will work. hi, possible better is to have a look into the plattform http://www.phpclasses.org. Maybe you find a class that doesn't based on pear. Regards, Ruprecht -

Re: [PHP-DB] Help with Web services (facebook, myspace)

2009-01-21 Thread Abah Joseph
I just saw something on pear.net http://pear.php.net/package/Services_Facebookmaybe it will work. On Wed, Jan 21, 2009 at 10:27 PM, Chris wrote: > Abah Joseph wrote: > >> Hello PHP people, >> I`m looking for facebook and myspace API that will enable user to login on >> my site using their faceb

Re: [PHP-DB] Help with Web services (facebook, myspace)

2009-01-21 Thread Chris
Abah Joseph wrote: Hello PHP people, I`m looking for facebook and myspace API that will enable user to login on my site using their facebook and myspace id. if this is not possible, can i find something closer like, user will be able to perform some activities from my site like inviting facebook/

RE: [PHP-DB] Help with JOIN query

2008-03-06 Thread Gary Wardell
TED] > Sent: Thu, March 06, 2008 6:33 PM > To: Gary Wardell; php-db@lists.php.net > Subject: Re: [PHP-DB] Help with JOIN query > > > On Thu, Mar 6, 2008 at 10:59 PM, Gary Wardell > <[EMAIL PROTECTED]> wrote: > > Ahh, to bad, I started using it with 5.0. I'm also a

Re: [PHP-DB] Help with JOIN query

2008-03-06 Thread Graham Cossey
On Thu, Mar 6, 2008 at 10:59 PM, Gary Wardell <[EMAIL PROTECTED]> wrote: > Ahh, to bad, I started using it with 5.0. I'm also a long time user of SQL > Server. > > Sorry if I caused confusion. > > Gary > You were getting my hopes up there Gary :-( -- Graham -- PHP Database Mailing List (h

RE: [PHP-DB] Help with JOIN query

2008-03-06 Thread Gary Wardell
Ahh, to bad, I started using it with 5.0. I'm also a long time user of SQL Server. Sorry if I caused confusion. Gary > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Help with JOIN query

2008-03-06 Thread Roberto Mansfield
Mysql doesn't support subselects in 4.0.x. That was added in 4.1. -Roberto J. Hill wrote: > I may be a little confused: the desire is to return all the rows from > TableA that match the record_id of a row in TableB that has the MAX > timestamp? > > If so, why not something like: > > SELECT * FR

RE: [PHP-DB] Help with JOIN query

2008-03-06 Thread Gary Wardell
> To: J. Hill; php-db@lists.php.net > Subject: Re: [PHP-DB] Help with JOIN query > > > On Thu, Mar 6, 2008 at 9:54 PM, J. Hill <[EMAIL PROTECTED]> wrote: > > I may be a little confused: the desire is to return all the > rows from > > TableA that match

Re: [PHP-DB] Help with JOIN query

2008-03-06 Thread Graham Cossey
On Thu, Mar 6, 2008 at 9:54 PM, J. Hill <[EMAIL PROTECTED]> wrote: > I may be a little confused: the desire is to return all the rows from > TableA that match the record_id of a row in TableB that has the MAX > timestamp? > > If so, why not something like: > > SELECT * FROM TableA a, TableB b W

Re: [PHP-DB] Help with JOIN query

2008-03-06 Thread J. Hill
I may be a little confused: the desire is to return all the rows from TableA that match the record_id of a row in TableB that has the MAX timestamp? If so, why not something like: SELECT * FROM TableA a, TableB b WHERE a.record_id=b.record_id && timestamp=(SELECT MAX(timestamp) FROM TableB) O

Re: [PHP-DB] Help with JOIN query

2008-03-06 Thread Krister Karlström
This will give you: ERROR : Invalid use of group function It seems like the use of an aggregate (or how is it spelled?) function is not allowed in a join statement... /Krister Jon L. wrote: You can try adding a quick test to the ON statement... SELECT * FROM TableA INNER JOIN TableB

Re: [PHP-DB] Help with JOIN query

2008-03-06 Thread Jon L.
You can try adding a quick test to the ON statement... SELECT * FROM TableA INNER JOIN TableB ON TableA.record_id = TableB.record_id AND TableB.timestamp = MAX(TableB.timestamp) Now, I haven't tested it. I can only say the theory of it is accurate. - Jon L. On Thu, Mar 6, 2008 at 12:46 P

Re: [PHP-DB] Help with JOIN query

2008-03-06 Thread Krister Karlström
Hi again! We're getting a bit of topic here, since this is pure SQL.. But anyway... I've played around with this one a bit since it seemed quite interesting... The best I can do is to get the oldest action... select TableA.record_id, product_ref, action, time_stamp from TableA join TableB on

Re: [PHP-DB] Help with JOIN query

2008-03-06 Thread Krister Karlström
Hi! Graham Cossey wrote: I was hoping to avoid joining everything as there can be many entries in TableB for each record in TableA. Also wouldn't your query only return one record? I need to return all records from TableA with the latest action from TableB as well. Yes, sorry - I realised th

Re: [PHP-DB] Help with JOIN query

2008-03-06 Thread Graham Cossey
On Thu, Mar 6, 2008 at 6:54 PM, Krister Karlström <[EMAIL PROTECTED]> wrote: > Hi! > > > Graham Cossey wrote: > > > TableA > > record_id > > product_ref > > > > TableB > > timestamp > > record_id > > action > > > > I want to create a SELECT that joins these 2 tables where the JOIN to >

Re: [PHP-DB] Help with JOIN query

2008-03-06 Thread Krister Karlström
Hi! Graham Cossey wrote: TableA record_id product_ref TableB timestamp record_id action I want to create a SELECT that joins these 2 tables where the JOIN to TableB only returns the most recent entry by timestamp. For instance, to select all columns: select * from TableA join TableB on Tab

Re: [PHP-DB] Help with MySql float

2008-02-17 Thread Chris
Daniel Brown wrote: On Feb 17, 2008 10:59 AM, Velen <[EMAIL PROTECTED]> wrote: Hi Guys, When inserting a value like 123567.8956 in my table it is rounding it to 2 decimal place. The field type is set as float. Can anyone tell me why it's not taking all the decimals? and How to insert the numb

Re: [PHP-DB] Help with MySql float

2008-02-17 Thread Daniel Brown
On Feb 17, 2008 10:59 AM, Velen <[EMAIL PROTECTED]> wrote: > Hi Guys, > > When inserting a value like 123567.8956 in my table it is rounding it to 2 > decimal place. The field type is set as float. > > Can anyone tell me why it's not taking all the decimals? and How to insert > the number with all

Re: [PHP-DB] Help with MySql float

2008-02-17 Thread Tobias Franzén
Velen wrote: Hi Guys, When inserting a value like 123567.8956 in my table it is rounding it to 2 decimal place. The field type is set as float. Can anyone tell me why it's not taking all the decimals? and How to insert the number with all the decimals? Thanks Velen Hello Velen, Your qu

Re: [PHP-DB] help with mysql connect error

2007-02-11 Thread Chris
Tim McGeary wrote: Chris wrote: Tim McGeary wrote: Stut wrote: Ok, so I did the recommended process of: mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd') -> WHERE Host = 'some_host' AND User = 'some_user'; mysql> FLUSH PRIVILEGES; This allows the CLI script to run successf

Re: [PHP-DB] help with mysql connect error

2007-02-09 Thread Tim McGeary
Chris wrote: Tim McGeary wrote: Stut wrote: Ok, so I did the recommended process of: mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd') -> WHERE Host = 'some_host' AND User = 'some_user'; mysql> FLUSH PRIVILEGES; This allows the CLI script to run successfully, but the web ph

Re: [PHP-DB] help with mysql connect error

2007-02-08 Thread Chris
Tim McGeary wrote: Stut wrote: Tim McGeary wrote: But I do have a MySQL 5 client: [EMAIL PROTECTED] html]# rpm -qa MySQL* MySQL-shared-compat-5.0.27-0.rhel3 MySQL-client-standard-5.0.27-0.rhel3 MySQL-python-0.9.1-6 MySQL-server-standard-5.0.27-0.rhel3 MySQL-devel-standard-5.0.27-0.rhel3 or ar

Re: [PHP-DB] help with mysql connect error

2007-02-08 Thread Tim McGeary
Stut wrote: Tim McGeary wrote: But I do have a MySQL 5 client: [EMAIL PROTECTED] html]# rpm -qa MySQL* MySQL-shared-compat-5.0.27-0.rhel3 MySQL-client-standard-5.0.27-0.rhel3 MySQL-python-0.9.1-6 MySQL-server-standard-5.0.27-0.rhel3 MySQL-devel-standard-5.0.27-0.rhel3 or are you saying that th

Re: [PHP-DB] help with mysql connect error

2007-02-08 Thread Stut
Tim McGeary wrote: Thank you for the link. I think that's probably the best way to go in this case, since it's only on a dev/test server. When I build the production server, I should probably upgrade to PHP5 anyhow. I assume that should not have this problem, right? It might. PHP5 can be b

Re: [PHP-DB] help with mysql connect error

2007-02-08 Thread Tim McGeary
Stut wrote: Tim McGeary wrote: But I do have a MySQL 5 client: [EMAIL PROTECTED] html]# rpm -qa MySQL* MySQL-shared-compat-5.0.27-0.rhel3 MySQL-client-standard-5.0.27-0.rhel3 MySQL-python-0.9.1-6 MySQL-server-standard-5.0.27-0.rhel3 MySQL-devel-standard-5.0.27-0.rhel3 or are you saying that th

Re: [PHP-DB] help with mysql connect error

2007-02-08 Thread Stut
Tim McGeary wrote: But I do have a MySQL 5 client: [EMAIL PROTECTED] html]# rpm -qa MySQL* MySQL-shared-compat-5.0.27-0.rhel3 MySQL-client-standard-5.0.27-0.rhel3 MySQL-python-0.9.1-6 MySQL-server-standard-5.0.27-0.rhel3 MySQL-devel-standard-5.0.27-0.rhel3 or are you saying that the PHP libs ha

Re: [PHP-DB] help with mysql connect error

2007-02-08 Thread Tim McGeary
Stut wrote: Tim McGeary wrote: Oh, duh! Ok. I wrote this: mysql_connect($hostname, $username, $password) or die(mysql_error()); mysql_select_db($dbname) or die(mysql_error()); $result = mysql_query("SELECT * FROM Requestor_type") or die(mysql_error());

Re: [PHP-DB] help with mysql connect error

2007-02-08 Thread Stut
Tim McGeary wrote: Oh, duh! Ok. I wrote this: mysql_connect($hostname, $username, $password) or die(mysql_error()); mysql_select_db($dbname) or die(mysql_error()); $result = mysql_query("SELECT * FROM Requestor_type") or die(mysql_error()); while($row = my

Re: [PHP-DB] help with mysql connect error

2007-02-08 Thread Tim McGeary
Stut wrote: Tim McGeary wrote: Tim McGeary wrote: Stut wrote: Tim McGeary wrote: I am new to this list today, so if I should be sending this to another specific PHP list, please let me know. I am getting the following error via the PHP web page I am building: Warning: mysql_connect(): Can'

Re: [PHP-DB] help with mysql connect error

2007-02-08 Thread Stut
Tim McGeary wrote: Please include the list in replies. Sorry, I meant to, but hit the wrong button. Tim McGeary wrote: Stut wrote: Tim McGeary wrote: I am new to this list today, so if I should be sending this to another specific PHP list, please let me know. I am getting the following er

Re: [PHP-DB] help with mysql connect error

2007-02-08 Thread Tim McGeary
Please include the list in replies. Sorry, I meant to, but hit the wrong button. Tim McGeary wrote: Stut wrote: Tim McGeary wrote: I am new to this list today, so if I should be sending this to another specific PHP list, please let me know. I am getting the following error via the PHP web

Re: [PHP-DB] help with mysql connect error

2007-02-08 Thread Tim McGeary
Stut wrote: Tim McGeary wrote: I am new to this list today, so if I should be sending this to another specific PHP list, please let me know. I am getting the following error via the PHP web page I am building: Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/

Re: [PHP-DB] help with mysql connect error

2007-02-08 Thread Stut
Tim McGeary wrote: I am new to this list today, so if I should be sending this to another specific PHP list, please let me know. I am getting the following error via the PHP web page I am building: Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mys

RE: [PHP-DB] help with file downloads from MySQL

2006-03-28 Thread Mickey Martin
from the queries and it put a newline at the end of the output data. Thanks everyone for the help with this. -Original Message- From: Oskar [mailto:[EMAIL PROTECTED] Sent: Friday, March 24, 2006 1:59 AM To: Mickey Martin; PHP db Subject: Re: [PHP-DB] help with file downloads from MySQL

RE: [PHP-DB] help with file downloads from MySQL

2006-03-24 Thread David Robley
ot;, $data; > > When the file is saved, it begins with 0a followed by TEST TEXT and then > the start of the file without another instance of 0a. > > Mickey > > > -Original Message- > From: Oskar [mailto:[EMAIL PROTECTED] > Sent: Friday, March 24, 2006 1:5

RE: [PHP-DB] help with file downloads from MySQL

2006-03-24 Thread Mickey Martin
ith 0a followed by TEST TEXT and then the start of the file without another instance of 0a. Mickey -Original Message- From: Oskar [mailto:[EMAIL PROTECTED] Sent: Friday, March 24, 2006 1:59 AM To: Mickey Martin; PHP db Subject: Re: [PHP-DB] help with file downloads from MySQL Mick

RE: [PHP-DB] help with file downloads from MySQL

2006-03-22 Thread Mickey Martin
it is configured today. Thanks, Mickey -Original Message- From: Giff Hammar [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 21, 2006 3:50 PM To: 'Mickey Martin'; 'Bastien Koert'; php-db@lists.php.net Subject: RE: [PHP-DB] help with file downloads from MySQL Can you use somet

RE: [PHP-DB] help with file downloads from MySQL

2006-03-21 Thread Giff Hammar
f -Original Message- From: Mickey Martin [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 21, 2006 4:05 PM To: 'Bastien Koert'; php-db@lists.php.net Subject: RE: [PHP-DB] help with file downloads from MySQL I tried purposely corrupting the file by adding blank spaces at the beginning of

RE: [PHP-DB] help with file downloads from MySQL

2006-03-21 Thread Mickey Martin
t: Tuesday, March 21, 2006 2:07 PM To: [EMAIL PROTECTED]; php-db@lists.php.net Subject: RE: [PHP-DB] help with file downloads from MySQL If you load the data into the field with addslashes, have you tried stripslashes on the way out? Bastien >From: "Mickey Martin" <[EMAIL PROTECTED]&

RE: [PHP-DB] help with file downloads from MySQL

2006-03-21 Thread Mickey Martin
Here's the code I'm using to upload if it helps: "; echo "Continue"; } mysql_close(); } else { ?> -Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 21, 2006 2:07 PM To: [EMAIL PROTECTED]; php-db@lists.php.ne

RE: [PHP-DB] help with file downloads from MySQL

2006-03-21 Thread Mickey Martin
hp-db@lists.php.net Subject: RE: [PHP-DB] help with file downloads from MySQL If you load the data into the field with addslashes, have you tried stripslashes on the way out? Bastien >From: "Mickey Martin" <[EMAIL PROTECTED]> >To: php-db@lists.php.net >Subject: [PHP-DB] help

RE: [PHP-DB] help with file downloads from MySQL

2006-03-21 Thread Bastien Koert
If you load the data into the field with addslashes, have you tried stripslashes on the way out? Bastien From: "Mickey Martin" <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: [PHP-DB] help with file downloads from MySQL Date: Tue, 21 Mar 2006 12:55:56 -0600 Every time I try to download

Re: [PHP-DB] Help with Variable Variables in Array

2006-02-20 Thread Andrew Darby
Thanks so much, Naintara, simplifying the field name in the way you suggested seems to fix it. Andrew On 2/20/06, Naintara <[EMAIL PROTECTED]> wrote: > Hi, > > Firstly, if you are assigning the value of variable $myrow['article_title'] > to $right_row, > you should print $right_row and not $$righ

RE: [PHP-DB] Help with Variable Variables in Array

2006-02-20 Thread Naintara
Hi, Firstly, if you are assigning the value of variable $myrow['article_title'] to $right_row, you should print $right_row and not $$right_row Because, if say, $myrow['article_title'] contained value "article1", $$right_row would look for variable $article1, which probably doesn't exist, hence n

Re: [PHP-DB] Help with

2005-09-02 Thread Fen Lu
Martin is right... carefully~ @ $db = new mysqli('localhost', 'root', 'password', 'database_table'); On 8/30/05, Richard Hart <[EMAIL PROTECTED]> wrote: > > Hi > > I'm new to PHP/MySQL and wondered if anyone on this list would be kind > enough to help me solve > this problem. I'm trying to autom

RE: [PHP-DB] Help with

2005-08-31 Thread Norland, Martin
e- From: Richard Hart [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 30, 2005 12:06 PM To: Bastien Koert; php-db@lists.php.net Subject: RE: [PHP-DB] Help with. . Thanks for your help Bastien. I have changed the authentication procedure but have come up against another problem. This time I

RE: [PHP-DB] Help with

2005-08-30 Thread Richard Hart
ully logged on.'; } else { echo "Your username and/or password have not been accepted. Please go back and try again."; } Thanks Richard -Original Message----- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: 30 August 2005 00:59 To: [EMAIL PROTECTED]; php-db@lists.ph

RE: [PHP-DB] Help with

2005-08-29 Thread Bastien Koert
you don't have a connection to the db...either because the name.password, db name are wrong or you lack the needed permissions to allow the query... note that this query is a really back idea...opens the whole db up...better to provide one connection and allow the users basic read write access

RE: [PHP-DB] Help with PHP

2005-04-25 Thread ReClMaples
I apologize but I figured out my mistake. Thanks -Rich -Original Message- From: ReClMaples [mailto:[EMAIL PROTECTED] Sent: Monday, April 25, 2005 10:05 PM To: PHP Subject: [PHP-DB] Help with PHP I'm not sure if this is the correct distro to be sending this question to, if it's not, let

Re: [PHP-DB] help with mySQL- Fatal error: Call to undefined function mysql_connect()...

2004-08-17 Thread Jeffrey Moss
(http://www.macromedia.com/devnet/mx/dreamweaver/articles/php_iis.html) -Jeff - Original Message - From: "Jeffrey Moss" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 17, 2004 12:08 PM Subject: Re: [PHP-DB] help with mySQL- Fatal error: Call to undef

Re: [PHP-DB] help with mySQL- Fatal error: Call to undefined function mysql_connect()...

2004-08-17 Thread Jeffrey Moss
Gotta recompile php with the --with-mysql option (or something like that). Try running configure --help You can see what options you compiled with by grepping for CONFIGURE in your Makefile. Here's what I got: [EMAIL PROTECTED] php-5.0.0b4 # grep CONFIGURE Makefile CONFIGURE_COMMAND = './configu

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

2004-07-23 Thread Gary Every
$sql_start = "SELECT * FROM table_name WHERE "; If($_POST['first_name'] != '') { $first_name = $_POST['first_name']; $sql_start .= "first_name LIKE '%$first_name%' AND "; } If($_POST['last_name'] != '') { $last_name = $_POST['last_name']; $sql_start .= "last_name LIK

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

2004-07-23 Thread Hutchins, Richard
I use PHP to check the search form's input fields then add them to the SQL statement if they contain data. And if you want the search to return all records from the table (let's hope there's not many then) if no search terms are provided then make the "WHERE" part of your SQL query an option based

Re: [PHP-DB] help with consecutive numbers in db

2004-06-24 Thread Pablo M. Rivas
Hello redhat, Hey... look at this: CREATE TABLE `testip` ( `id` int(10) unsigned NOT NULL auto_increment, `theip` varchar(100) NOT NULL default '', PRIMARY KEY (`id`), UNIQUE KEY `theip` (`theip`) ) TYPE=MyISAM AUTO_INCREMENT=7 ; SELECT theip, SUBSTRING_INDEX( theip, ".", 1

Re: [PHP-DB] help with consecutive numbers in db

2004-06-24 Thread Matt Matijevich
[snip] The IP's (for example 192.168.1.1) are all in a single field. [/snip] If it is a possiblity, I would store each IP in its own row, with a column in that row being some kind of flag, like: is_issued as a logical column. Can you change you db layout or is it set in stone? -- PHP Database M

Re: [PHP-DB] Help With An UPDATE Query Please

2004-02-10 Thread Ignatius Reilly
UPDATE table SET column = CONCAT( MID( column, 2, LENGTH( column ) - 1 ), MID( column, 1, 1 ) ) WHERE column LIKE 'M%' HTH Ignatius _ - Original Message - From: "Shaun" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 10, 2004 14:15 Subjec

Re: [PHP-DB] Help with an UPDATE query please

2004-02-05 Thread John W. Holmes
> > I have (among others) two DATE columns in a table; Booking_Date and > > Booking_Completion_Date. How can I run a query that updates > > Booking_Completion_Date to be 2 days after Booking_Date where > > Booking_Completion_Date is NULL? UPDATE table SET Booking_Completion_Date = Booking_Date + I

[Fwd: Re: [PHP-DB] Help with an UPDATE query please]

2004-02-05 Thread Stuart Gilbert
[Forwarded for Paxson Jr. because this was only sent to me.] you can also easily use the mysql date functions http://www.mysql.com/doc/en/Date_and_time_functions.html On 05. Feb 2004, at 11:23 Uhr, Stuart Gilbert wrote: Presuming you have the date in your PHP code you could simply add 172800 (

Re: [PHP-DB] Help with an UPDATE query please

2004-02-05 Thread Stuart Gilbert
Presuming you have the date in your PHP code you could simply add 172800 (seconds in 2 days) to the current value and insert it in the same way as you are doing with your current dates. If you post how you're inserting your dates, what format you're using and stuff like that then you'll probabl

Re: [PHP-DB] Help with a COUNT / SELECT query

2004-01-23 Thread Micah Stevens
SELECT COUNT(WMS_Area.Area_ID) AS complete_areas FROM WMS_Area, WMS_Bookings WHERE WMS_Area.Area_ID = WMS_Bookings.Area_ID AND MIN(WMS_Bookings.Booking_Status) = 2 GROUP BY WMS_Area.Area_ID Or something like that.. there's probably a better way to do it.. On Fri January 23 2004 1:05 pm, Shau

Re: [PHP-DB] Help with a COUNT / SELECT query

2004-01-23 Thread Shaun
Thanks for your reply, but that only tells me how many complete Bookings there are. I need to know how many Areas are complete i.e. for each Area where Bookings take place, all of those Bookings have been completed. Any ideas? "Oòvn?Oòsis" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PRO

Re: [PHP-DB] Help with a COUNT / SELECT query

2004-01-23 Thread Martín Marqués
Mensaje citado por Shaun <[EMAIL PROTECTED]>: > Hi, > > I have a Bookings application. When a Booking is made it is entered in to > the Bookings table. Bookings take place at Areas, held in the Areas table. > Each Area has a unique Area_ID held in the Bookings table for each Booking. > Each Booki

Re: [PHP-DB] Help with file upload

2003-10-21 Thread bunmi
AIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: Bunmi Akinmboni <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED] Content-Type: text/plain Message-Id: <[EMAIL PROTECTED]> Mime-Version: 1.0 Date: 16 Oct 2003 15:12:38 +0200 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DB] Help with file uplo

Re: [PHP-DB] Help with file upload

2003-10-16 Thread Neil Smth
0 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DB] Help with file upload On Thu, 2003-10-16 at 09:58, Bunmi Akinmboni wrote: > Thanks Neil. My ultimate aim to update my database with the details of > the upload after it uploads successfully, but I need to solve this > problem first.

Re: [PHP-DB] Help with file upload

2003-10-16 Thread Ruprecht Helms
On Thu, 2003-10-16 at 09:58, Bunmi Akinmboni wrote: > Thanks Neil. My ultimate aim to update my database with the details of > the upload after it uploads successfully, but I need to solve this > problem first. > > The folder already has permission 777. Dateiname: /home/www/web172/phptmp/phppYl

Re: [PHP-DB] Help with file upload

2003-10-16 Thread Nitin
IL PROTECTED]> Sent: Thursday, October 16, 2003 1:56 PM Subject: Re: [PHP-DB] Help with file upload > HI Nitin, > Is that not dangerous as it will affect the entire server structure? > Bunmi > > Nitin wrote: > > > permission is ok but it's got to be inside the hom

Re: [PHP-DB] Help with file upload

2003-10-16 Thread Bunmi Akinmboni
t;[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 16, 2003 1:28 PM Subject: Re: [PHP-DB] Help with file upload Thanks Neil. My ultimate aim to update my database with the details of the upload after it uploads successfully, but I need to solve this problem first. The fo

Re: [PHP-DB] Help with file upload

2003-10-16 Thread Nitin
permission is ok but it's got to be inside the home directory of web server, which is /var/www by default for apache Nitin - Original Message - From: "Bunmi Akinmboni" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 16, 2003 1:28 PM Subj

Re: [PHP-DB] Help with file upload

2003-10-16 Thread Bunmi Akinmboni
: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DB] Help with file upload I used this code now: if (is_uploaded_file($_FILES['ufile1']['tmp_name'])) { move_uploaded_file($_FILES['ufile1']['tmp_

Re: [PHP-DB] Help with file upload

2003-10-16 Thread Bunmi Akinmboni
L PROTECTED]> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DB] Help with file upload I used this code now: if (is_uploaded_file($_FILES['ufile1']['tmp_name'])) { move_uploaded_file($_FILES[

Re: [PHP-DB] Help with file upload

2003-10-16 Thread Neil Smth
TECTED] Date: Thu, 16 Oct 2003 06:09:07 +0100 From: Bunmi Akinmboni <[EMAIL PROTECTED]> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DB] Help with file upload I used this code now: if (is

Re: [PHP-DB] Help with file upload

2003-10-16 Thread Budelak
I just changed the permission on fu folder to 777 but it gives me the same problem. I'm writing this script so that I can use it to upload to jpeg files. The code is hereby attached. Bunmi Gabriel Peugnet wrote: For the message: Warning: move_uploaded_file(./ayservenet.jpg): failed to open stream

Re: [PHP-DB] Help with file upload

2003-10-16 Thread Bunmi Akinmboni
I just changed the permission on fu folder to 777 but it gives me the same problem. I'm writing this script so that I can use it to upload to jpeg files. The code is hereby attached. Gabriel Peugnet wrote: For the message: Warning: move_uploaded_file(./ayservenet.jpg): failed to open stream: Pe

Re: [PHP-DB] Help with file upload

2003-10-16 Thread Ruprecht Helms
On Thu, 2003-10-16 at 07:14, John W. Holmes wrote: > Bunmi Akinmboni wrote: > > > Warning: move_uploaded_file(./ayservenet.jpg): failed to open stream: > > Permission denied in /home/ayserve/public_html/fu/fuprocess.php on line 6 > > PHP runs as the web server and it does not have permission to

Re: [PHP-DB] Help with file upload

2003-10-16 Thread Gabriel Peugnet
For the message: > Warning: move_uploaded_file(./ayservenet.jpg): failed to open stream: > Permission denied in /home/ayserve/public_html/fu/fuprocess.php on line 6 you have to change the permissions of the file folder where you are copying the file. If you created it via FTP then you can't use co

Re: [PHP-DB] Help with file upload

2003-10-15 Thread Bunmi Akinmboni
I used this code now: if (is_uploaded_file($_FILES['ufile1']['tmp_name'])) { move_uploaded_file($_FILES['ufile1']['tmp_name'],'./' . $_FILES['ufile1']['name']); This is the reply I got: Warning: move_uploaded_file(./ayservenet.jpg): failed to open stream: Permission denied in /home/ayserve/pu

Re: [PHP-DB] Help with file upload

2003-10-15 Thread Bunmi Akinmboni
So what could be the problem? I reaaly don't know. Bunmi John W. Holmes wrote: Bunmi Akinmboni wrote: Warning: move_uploaded_file(./ayservenet.jpg): failed to open stream: Permission denied in /home/ayserve/public_html/fu/fuprocess.php on line 6 PHP runs as the web server and it does not have

Re: [PHP-DB] Help with file upload

2003-10-15 Thread John W. Holmes
Bunmi Akinmboni wrote: Warning: move_uploaded_file(./ayservenet.jpg): failed to open stream: Permission denied in /home/ayserve/public_html/fu/fuprocess.php on line 6 PHP runs as the web server and it does not have permission to write to the current directory. If you're using IIS, PHP runs as th

Re: [PHP-DB] Help with file upload

2003-10-15 Thread Bunmi Akinmboni
I used this code now: if (is_uploaded_file($_FILES['ufile1']['tmp_name'])) { move_uploaded_file($_FILES['ufile1']['tmp_name'],'./' . $_FILES['ufile1']['name']); This is the reply I got: Warning: move_uploaded_file(./ayservenet.jpg): failed to open stream: Permission denied in /home/ayserve

Re: [PHP-DB] Help with file upload

2003-10-15 Thread Bunmi Akinmboni
This is reply I got: Warning: move_uploaded_file(./ayservenet.jpg): failed to open stream: Permission denied in /home/ayserve/public_html/fu/fuprocess.php on line 6 Warning: move_uploaded_file(): Unable to move '/tmp/phpfJyDSw' to './ayservenet.jpg' in /home/ayserve/public_html/fu/fuprocess.php

Re: [PHP-DB] Help with file upload

2003-10-15 Thread George Patterson
This in in the php manual (http://www.php.net/manual/en/features.file-upload.php) but anyway... The value contained in $_FILES['ufile1']['name'] is not the name of the temporary file on the server. Try $_FILES['ufile1']['tmp_name'] instead Hence the lines if (is_uploaded_file($_FILES['ufile1']

Re: [PHP-DB] Help with file upload

2003-10-15 Thread John W. Holmes
Bunmi Akinmboni wrote: His is the new code: You should be using move_uploaded_file() instead of copy(), first of all. Next, the two arguments passed to either copy() or move_uploaded_file() are _filenames_, not directories. So something like move_uploaded_file($_FILES['ufile1']['tmp_name'],'./'

Re: [PHP-DB] Help with file upload

2003-10-15 Thread Bunmi Akinmboni
His is the new code: if (is_uploaded_file($_FILES['ufile1']['tmp_name'])) { copy($_FILES['ufile1']['tmp_name'], "."); echo "$ufile1_name "; echo "DONE"; echo " "; print_r($_FILES); } else { echo "Possible file upload attack. Filename: " . $_FILES['ufile1']['name']; echo " "; print_r

Re: [PHP-DB] Help with file upload

2003-10-15 Thread Bunmi Akinmboni
Thanks John, I had done it before and still tried it again now. This is what I get: Warning: copy(.): failed to open stream: Is a directory in /home/ayserve/public_html/fu/fuprocess.php on line 6 ayservenet.jpg DONE Array ( [ufile1] => Array ( [name] => ayservenet.jpg [type] => image/pjpeg [tmp_n

Re: [PHP-DB] Help with file upload

2003-10-15 Thread John W. Holmes
Bunmi Akinmboni wrote: Pls Help. I have done a lot of reading prior to this yet I just can't seem make it work. I wrote an upload program as seen below but the response I got was: Possible file upload attack. Filename: ayservenet.jpg Array ( [ufile1] => Array ( [name] => ayservenet.jpg [type] =

Re: [PHP-DB] HELP With UPDATE Query in mySQL

2003-10-06 Thread pete M
and put it inside a transaction cos in case something goes wrong part of the way through pete Jeff Shapiro wrote: This should do it: UPDATE Bookings SET Booking_Start_Date = CONCAT(DATE_FORMAT(Booking_Start_Date, '%Y-%m-%d'), '09:00:00'), Booking_End_Date = CONCAT(DATE_FORMAT(Booking_End_Date

  1   2   >