Re: [PHP-DB] input statement in php

2010-07-27 Thread Richard Quadling
On 26 July 2010 15:38, Bavithra R bavithr...@gmail.com wrote: hi friends.. Is there any equivalent statement in php  for scanf or cin in c or c++? That is without using html and creating forms. WOW. Completely surprised by the two responses that were given. ?php while ($userinfo =

[PHP-DB] input statement in php

2010-07-26 Thread Bavithra R
hi friends.. Is there any equivalent statement in php for scanf or cin in c or c++? That is without using html and creating forms. Thanks in advance regards --Bavithra.R

RE: [PHP-DB] input statement in php

2010-07-26 Thread HallMarc Websites
hi friends.. Is there any equivalent statement in php for scanf or cin in c or c++? That is without using html and creating forms. Thanks in advance regards --Bavithra.R No, there are no equivalents in PHP. __ Information from ESET Smart Security, version of virus signature

RE: [PHP-DB] input statement in php

2010-07-26 Thread Daevid Vincent
-Original Message- From: Bavithra R [mailto:bavithr...@gmail.com] Sent: Monday, July 26, 2010 7:39 AM To: php-db@lists.php.net Subject: [PHP-DB] input statement in php hi friends.. Is there any equivalent statement in php for scanf or cin in c or c++? That is without

[PHP-DB] Prepared Statement Insert Problem

2009-07-21 Thread Jason Carson
Hello everyone, I have a problem. I use the following to *try* and insert data into my MySQL database... //Variables come from a form $username= $_POST['username']; $password = $_POST['password']; $email = $_POST['email']; //Connect to the database $connect = mysqli_connect($hostname,

Re: [PHP-DB] Prepared Statement Insert Problem

2009-07-21 Thread kesavan trichy rengarajan
Remove the quotes around the variables in all your statements. For example, this statement: mysqli_stmt_bind_param($submitadmin, isss, '$numrows', '$admin', sha1('$password'), '$email'); could be rewritten as: mysqli_stmt_bind_param($submitadmin, isss, $numrows, $admin, sha1($password), $email);

Re: [PHP-DB] Prepared Statement Insert Problem

2009-07-21 Thread Jason Carson
That worked, thanks! Remove the quotes around the variables in all your statements. For example, this statement: mysqli_stmt_bind_param($submitadmin, isss, '$numrows', '$admin', sha1('$password'), '$email'); could be rewritten as: mysqli_stmt_bind_param($submitadmin, isss, $numrows,

Re: [PHP-DB] Prepared Statement Insert Problem

2009-07-21 Thread Christopher Jones
kesavan trichy rengarajan wrote: could be rewritten as: mysqli_stmt_bind_param($submitadmin, isss, $numrows, $admin, sha1($password), $email); Turning on E_STRICT in PHP 5.3 will show PHP Strict Standards: Only variables should be passed by reference This is also true in earlier

Re: [PHP-DB] Prepared Statement Insert Problem

2009-07-21 Thread Jason Carson
Done. Thanks for letting me know about that. kesavan trichy rengarajan wrote: could be rewritten as: mysqli_stmt_bind_param($submitadmin, isss, $numrows, $admin, sha1($password), $email); Turning on E_STRICT in PHP 5.3 will show PHP Strict Standards: Only variables should be

Re: [PHP-DB] Prepared Statement Insert Problem

2009-07-21 Thread Bilal Ahmad
Hi i wanna ask a question. I am trying to create an image on fly, please do help me , following is the code. *File Name : Font.php Code: * html head titleImage Creation/title script language=javascript var xmlhttp; function showPic() { xmlhttp=GetXmlHttpObject(); if (xmlhttp==null) {

[PHP-DB] mysql statement

2007-09-26 Thread Jas
I am looking for some advice on how to achieve something and so far have been unable to do what I am looking to do. Here is the query I am using: mysql SELECT * - FROM `orders` - WHERE `ordernum` LIKE 35132 - OR `price` LIKE 35132 - OR `partnum` LIKE 35132 - OR `vendor` LIKE

Re: [PHP-DB] sql statement - complex order by

2007-07-02 Thread Stut
Bryan wrote: SELECT * FROM productgroup WHERE groupid = $productid AND label = 'Cats' ORDER BY title SELECT * FROM productgroup WHERE groupid = $productid AND label != 'Cats' ORDER BY label,title I'd like to find a way to combine these 2 statements. I want to list out all the products,

Re: [PHP-DB] sql statement - complex order by

2007-07-02 Thread tg-php
Try this: SELECT * FROM productgroup WHERE groupid = $productid ORDER BY label = 'Cats' DESC, title The test SQL I did to make sure I understood it was this (against our Users table): select * from users order by first = 'Bob' DESC, first, last It put all the Bobs first, sorting them by

Re: [PHP-DB] sql statement - complex order by

2007-07-02 Thread Bryan
I think there's one small piece of data I left out. I'm working with php/mssql, no mysql. I'll move to mysql when I get everything else built. Mssql 2000 doesn't seem to like the = sign in the order by clause. It looks like both of you so far have come up with the same syntax though so it must

Re: [PHP-DB] sql statement - complex order by

2007-07-02 Thread Bryan
I think there's one small piece of data I left out. I'm working with php/mssql, not mysql. I'll move to mysql when I get everything else built. Mssql 2000 doesn't seem to like the = sign in the order by clause. It looks like both of you so far have come up with the same syntax though so it

[PHP-DB] IF statement in WHILE statement

2007-02-13 Thread Matthew Ferry
Hello Everyone, Got another simple problem here I am trying to do a if statement inside a while (mysql_fetch_array) Here is my code: if ($link = mysql_tech_array($links)) { do { if ($_GET['page'] = $link[file]) { $status = 'reg_button.php'; } else { $status = 'push_button.php'; }

Re: [PHP-DB] IF statement in WHILE statement

2007-02-13 Thread Chris
Matthew Ferry wrote: Hello Everyone, Got another simple problem here I am trying to do a if statement inside a while (mysql_fetch_array) Here is my code: if ($link = mysql_tech_array($links)) { do { if ($_GET['page'] = $link[file]) { You're assigning $_GET['page'] to whatever is

Re: [PHP-DB] IF statement in WHILE statement

2007-02-13 Thread Matthew Ferry
Thanks Chris... added the extra = and its working fine... Have a nice day everyone Matt - Original Message - From: Chris [EMAIL PROTECTED] To: Matthew Ferry [EMAIL PROTECTED] Cc: php-db@lists.php.net Sent: Tuesday, February 13, 2007 11:53 PM Subject: Re: [PHP-DB] IF statement

Re: [PHP-DB] Prepared Statement not working (mysql 5)

2005-07-19 Thread Georg Richter
Am Do, den 14.07.2005 schrieb Marco Bascietto um 13:15: It looks like there is a problem with mysqli PS when the client and the server share the same machine. Does anyone have a clue on what is going on or point me to some tests I can do? There is no problem when running client and

[PHP-DB] Prepared Statement not working (mysql 5)

2005-07-14 Thread Marco Bascietto
Hello list, The following example script uses prepared statements to bind input and output parameters It works flowlessy using php 5 mysqli on a client machine and MySQL 5.0.7 beta on the server (192.168.0.2): 1: ?php 2: $m = new mysqli('192.168.0.2', 'xxx', 'xxx'); 3: $m-select_db('xxx'); 4:

[PHP-DB] if statement

2005-01-28 Thread Craig Hoffman
Hi There, I am trying to write an if statement to see if an array has any values in it and if it does do something. for example: $ticklist2 = array('$values) if (array_values(empty($ticklist2))){ do something } else { do something else } I just can't get this to work. Any help would be

Re: [PHP-DB] if statement

2005-01-28 Thread Jochem Maas
Craig Hoffman wrote: Hi There, I am trying to write an if statement to see if an array has any values in it and if it does do something. for example: $ticklist2 = array('$values) if (array_values(empty($ticklist2))){ empty() is used to check whether a var isset and is not null, or false -

Re: [PHP-DB] if statement

2005-01-28 Thread Balwant Singh
i may be wrong but as i understand that you want to check whether a array holds any value or not -- for this u can use COUNT function of array which will count the values of the array. with best wishes balwant On Sat, 2005-01-29 at 06:29, Craig Hoffman wrote: Hi There, I am trying to write

Re: [PHP-DB] SQL statement

2005-01-07 Thread Jochem Maas
PHPDiscuss - PHP Newsgroups and mailing lists wrote: Hello everybody, I'm building a small application and I have trouble passing a POST variable form one page to another inside the SQL statement. The query displayed below works great without the .$_POST['CompanyName']. $query_company_listing =

RE: [PHP-DB] SQL statement syntaxis

2005-01-07 Thread Bastien Koert
: [EMAIL PROTECTED] (PHPDiscuss - PHP Newsgroups and mailing lists) To: php-db@lists.php.net Subject: [PHP-DB] SQL statement syntaxis Date: 6 Jan 2005 19:12:16 - Hello everybody, I'm building a small application and I have trouble passing a POST variable form one page to another inside the SQL

Re: [PHP-DB] SQL statement

2005-01-07 Thread Jochem Maas
Jason, can you please turn off the return receipts on emails you send to the list. it's bloody annoying to have 'The Sender wishes to be notified' popup messages everytime I read one of your emails (and, alas, I don't have the skill to hack the return receipt crap right out of Tbird). BTW

Re: [PHP-DB] SQL statement

2005-01-07 Thread graeme
Hi, To stop the return receipt dialog appearing in Tbird... Tools... Options... Advanced... Return Receipt and select Never send a return receipt. Or you can choose some of the other selections. graeme Jochem Maas wrote: Jason, can you please turn off the return receipts on emails you send to

[PHP-DB] SQL statement syntaxis

2005-01-06 Thread PHPDiscuss - PHP Newsgroups and mailing lists
Hello everybody, I'm building a small application and I have trouble passing a POST variable form one page to another inside the SQL statement. The query (displayed below) works great without the .$_POST['CompanyName']. $query_company_listing = SELECT CompanyID, CompanyName,

[PHP-DB] SQL statement syntaxis

2005-01-06 Thread PHPDiscuss - PHP Newsgroups and mailing lists
Hello everybody, I'm building a small application and I have trouble passing a POST variable form one page to another inside the SQL statement. The query (displayed below) works great without the .$_POST['CompanyName']. $query_company_listing = SELECT CompanyID, CompanyName,

[PHP-DB] SQL statement

2005-01-06 Thread PHPDiscuss - PHP Newsgroups and mailing lists
Hello everybody, I'm building a small application and I have trouble passing a POST variable form one page to another inside the SQL statement. The query displayed below works great without the .$_POST['CompanyName']. $query_company_listing = SELECT CompanyID, CompanyName, CompanyOrDepartment,

RE: [PHP-DB] SQL statement

2005-01-06 Thread Jason Walker
@lists.php.net Subject: [PHP-DB] SQL statement Hello everybody, I'm building a small application and I have trouble passing a POST variable form one page to another inside the SQL statement. The query displayed below works great without the .$_POST['CompanyName']. $query_company_listing = SELECT

RE: [PHP-DB] Wait Statement... ?

2004-07-21 Thread Daevid Vincent
Uhmmm.. how effective is a brute force attack where you can only try one combination per second? It's going to take you a while to get through that dictionary. How determined are you ;-) Our product has a brute force attacker in it, and for some protocols, we have to wait a few seconds

RE: [PHP-DB] Wait Statement... ?

2004-07-21 Thread Daevid Vincent
I like this idea of longer sleeps for each fail in theory, but it becomes moot if you only allow 3 failed attempts. -Original Message- From: Tim Van Wassenhove [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 3:37 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Wait Statement

Re: [PHP-DB] Wait Statement... ?

2004-07-21 Thread Shah
Well, everyone is in big discussion about this, so i figure i'll toss in my worthless 2 cents. Say your users have a password of like 8 characters, Brutus (used for brute forcing) will tell someone trying to gain access that they'll have better luck asking the person. So the only real threat

[PHP-DB] Wait Statement... ?

2004-07-20 Thread ..: GamCo :..
Hi all, I would like to add a line of code in PHP that will execute a wait before executing the next set of code. How do i do that ? Regards, GM -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Wait Statement... ?

2004-07-20 Thread Ignatius Reilly
sleep( nb of seconds ) ; _ - Original Message - From: ..: GamCo :.. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 9:44 AM Subject: [PHP-DB] Wait Statement... ? Hi all, I would like to add a line of code in PHP that will execute a wait

Re: [PHP-DB] Wait Statement... ?

2004-07-20 Thread ..: GamCo :..
hhhmmm... ok, i added the sleep() function in my page. what i'm basically doing is :- i have a .php page where people log-in from. from there i send the form to another .php page that actually checks the login and registers a session with the username and password as session variables. then on

Re: [PHP-DB] Wait Statement... ?

2004-07-20 Thread Jason Wong
On Tuesday 20 July 2004 16:56, ..: GamCo :.. wrote: ok, i added the sleep() function in my page. what i'm basically doing is :- i have a .php page where people log-in from. from there i send the form to another .php page that actually checks the login and registers a session with the

Re: [PHP-DB] Wait Statement... ?

2004-07-20 Thread John W. Holmes
..: GamCo :.. wrote: ok, i added the sleep() function in my page. what i'm basically doing is :- i have a .php page where people log-in from. from there i send the form to another .php page that actually checks the login and registers a session with the username and password as session variables.

RE: [PHP-DB] Wait Statement... ?

2004-07-20 Thread Daevid Vincent
[mailto:[EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 7:10 AM To: ..: GamCo :.. Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Wait Statement... ? ..: GamCo :.. wrote: ok, i added the sleep() function in my page. what i'm basically doing is :- i have a .php page where people log

Re: [PHP-DB] Wait Statement... ?

2004-07-20 Thread John W. Holmes
Daevid Vincent wrote: Similarly, I could adjust my brute force attack to sleep() a pre-determined amount of time too ;-) Uhmmm.. how effective is a brute force attack where you can only try one combination per second? It's going to take you a while to get through that dictionary. The whole

Re: [PHP-DB] Wait Statement... ?

2004-07-20 Thread Ignatius Reilly
PROTECTED]; 'John W. Holmes' [EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 9:47 PM Subject: RE: [PHP-DB] Wait Statement... ? Similarly, I could adjust my brute force attack to sleep() a pre-determined amount of time too ;-) The whole 'sleep()' idea just seems silly. I agree with Jason. Just validate

Re[2]: [PHP-DB] Wait Statement... ?

2004-07-20 Thread Pablo M. Rivas
Hello John, sleep() is the brute deffense of the brute force attack... You can make a script that opens simultaneous attacks JWH I'm not saying using sleep is the solution to security problems, but JWH it can be one layer of your defense. -- Best regards, Pablo -- PHP Database

Re: [PHP-DB] Wait Statement... ?

2004-07-20 Thread Tim Van Wassenhove
In article [EMAIL PROTECTED], John W. Holmes wrote: Daevid Vincent wrote: Similarly, I could adjust my brute force attack to sleep() a pre-determined amount of time too ;-) Uhmmm.. how effective is a brute force attack where you can only try one combination per second? It's going to take

Re: Re[2]: [PHP-DB] Wait Statement... ?

2004-07-20 Thread Jason Wong
On Wednesday 21 July 2004 05:00, Pablo M. Rivas wrote: sleep() is the brute deffense of the brute force attack... You can make a script that opens simultaneous attacks One thing to bear in mind is that sleep() will hog resources and can lead to DOS. -- Jason Wong - Gremlins Associates

Re: [PHP-DB] Wait Statement... ?

2004-07-20 Thread John W. Holmes
Tim Van Wassenhove wrote: In article [EMAIL PROTECTED], John W. Holmes wrote: Daevid Vincent wrote: Similarly, I could adjust my brute force attack to sleep() a pre-determined amount of time too ;-) Uhmmm.. how effective is a brute force attack where you can only try one combination per second?

[PHP-DB] mysqli/Statement isn't valid anymore in x.php line #

2004-07-19 Thread Gilmore, Corey (DPC)
Hello, Is anyone familiar with what would cause an error like this: Warning: Statement isn't valid anymore in includes\import.inc.php on line 810 I'm using MySQL 4.1.2a, PHP 5.0.0 with Apache 2.0.50. All tables are InnoDB format. The calling function is: function insert_phone($ContactID) {

Re: [PHP-DB] mysqli/Statement isn't valid anymore in x.php line #

2004-07-19 Thread John W. Holmes
Gilmore, Corey (DPC) wrote: Is anyone familiar with what would cause an error like this: Warning: Statement isn't valid anymore in includes\import.inc.php on line 810 1. Which line is 810? That's going to really help someone determine why you may be getting this warning. 2. This is a warning,

RE: [PHP-DB] mysqli/Statement isn't valid anymore in x.php line #

2004-07-19 Thread Gilmore, Corey (DPC)
John Holmes wrote: Gilmore, Corey (DPC) wrote: Is anyone familiar with what would cause an error like this: Warning: Statement isn't valid anymore in includes\import.inc.php on line 810 1. Which line is 810? That's going to really help someone determine why you may be getting this

[PHP-DB] SQL Statement

2004-05-18 Thread Thompson, Jimi
For some background, I've been tasked with building a marketing tracking application by the PHB's who think that being able to write SQL means you can code. I know how to get data into a database and I can do thing with it once it's in there, but this is one of my first attempts at extracting

Re: [PHP-DB] SQL Statement

2004-05-18 Thread Cal Evans
Jimi, PHP does not return an error because it knows nothing about valid sql. It's just knows if it's a valid PHP statement. (which it is because you've got the 's in the right place and a ; at the end. ) :) It's up to MySQL to return an error. As to your statement. 1: It's easier and valid in

Re: [PHP-DB] SQL Statement

2004-05-18 Thread John W. Holmes
Thompson, Jimi wrote: So then I try do this ?php if ($fk_phone != NULL) { $sqlwrk = SELECT `pk_phone_reports`, SUM(`calls`) AS `total_calls`, `date`, `calls` , `fk_ph_num` FROM `phone_reports`; $sqlwrk .= WHERE `pk_phone_number` = . $fk_phone; $rswrk =

[PHP-DB] If statement or something else?

2004-03-31 Thread JeRRy
Hi, Okay here is a sniplet of some code... snip ?php mysql_connect (localhost, tassie_jerry, s2390lpTAS225); mysql_select_db (tassie_tipping); $qr = mysql_query(SELECT IF ( misc = ( 'y' ) , 'Form Action=tipupdate.php METHOD=POST enctype=multipart/form-data', 'Form Action=tip1.php METHOD=POST

Re: [PHP-DB] Update Statement

2004-02-18 Thread Ricardo Lopes
Subject: [PHP-DB] Update Statement hi all, I would like to do the following: update Table1, Table2 set Table1.field1 = Table2.field2 where Table1.no = Table2.no however, i found that multiple updates can only work for MySQL version 4.0.4 but mine is 3.23.54... can anyone enlighten me on how I can

Re: [PHP-DB] Update Statement

2004-02-18 Thread Ng Hwee Hwee
- Original Message - From: Ricardo Lopes [EMAIL PROTECTED] To: Ng Hwee Hwee [EMAIL PROTECTED] Cc: PHP DB [EMAIL PROTECTED] Sent: Wednesday, February 18, 2004 5:41 PM Subject: Re: [PHP-DB] Update Statement you could use: for ($i=0; $i max; $i++) { mysql_query(update Table1

[PHP-DB] Update Statement

2004-02-17 Thread Ng Hwee Hwee
hi all, I would like to do the following: update Table1, Table2 set Table1.field1 = Table2.field2 where Table1.no = Table2.no however, i found that multiple updates can only work for MySQL version 4.0.4 but mine is 3.23.54... can anyone enlighten me on how I can achieve the same results with

Re: [PHP-DB] WHERE statement used multiple times.

2003-10-20 Thread JeRRy
Chris wrote: You can put together WHERE statements with an AND or an OR. For instance, SELECT id FROM users WHERE id='2' OR id='3' You know, if you had a few suspicions about this sort of thing you could always give it a spin in a Query. Worst case scenario is you will get an error. -

[PHP-DB] WHERE statement used multiple times.

2003-10-19 Thread JeRRy
Hi, If I was to want to use the WHERE statement multiple times (more than once) how do I seperate each WHERE statement? Would it be with a ',' (coma) or a ' ' (space) or what? Or not possible to have multiple WHERE's in the one query? I need 2 tables checked before executing the

Re: [PHP-DB] WHERE statement used multiple times.

2003-10-19 Thread Chris Wanstrath
On Mon, 2003-10-20 at 00:56, JeRRy wrote: Hi, If I was to want to use the WHERE statement multiple times (more than once) how do I seperate each WHERE statement? Would it be with a ',' (coma) or a ' ' (space) or what? Or not possible to have multiple WHERE's in the one

[PHP-DB] Select Statement with output in different colors.

2003-06-17 Thread Christopher Lyon
I have a php script that does some select statements, on mysql, and outputs that to a table. I would like to change the color of the table row depending upon one of the fields. The select statements are from a syslog database that I have and I would like to highlight key events by changing the

RE: [PHP-DB] Select Statement with output in different colors.

2003-06-17 Thread Peter Lovatt
/tr'; }// end while HTH Peter -Original Message- From: Christopher Lyon [mailto:[EMAIL PROTECTED] Sent: 17 June 2003 22:35 To: [EMAIL PROTECTED] Subject: [PHP-DB] Select Statement with output in different colors. I have a php script that does some

Re: [PHP-DB] Select Statement with output in different colors.

2003-06-17 Thread Becoming Digital
/tr'; }// end while HTH Peter -Original Message- From: Christopher Lyon [mailto:[EMAIL PROTECTED] Sent: 17 June 2003 22:35 To: [EMAIL PROTECTED] Subject: [PHP-DB] Select Statement with output in different colors. I have a php script that does some select

RE: [PHP-DB] Select Statement with output in different colors.

2003-06-17 Thread Christopher Lyon
9:51 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Select Statement with output in different colors. Here's a slight alteration to Peter's code in case someone isn't familiar with switch statements. Ooh, such a bad pun, as if there's any other kind. ? $query = 'SELECT * FROM table

[PHP-DB] Select statement drops 10th digit during table lookup?

2003-06-13 Thread G E Holt
I hope this is something easy I am overlooking but here goes: I have a table called: country which has the following fields: FieldType ip_from double(11,0) ip_todouble(11,0) country_code char(2) country_name varchar(50) IP_FROM

Re: [PHP-DB] Select statement drops 10th digit during table lookup?

2003-06-13 Thread Ronan Chilvers
On 13 Jun,2003 at 0:48 G E Holt wrote: $resolved=$DB_site-query_first(SELECT * FROM country WHERE '$resolvingip' BETWEEN ip_from AND ip_to); Don't think you should have the '' around the ip number. Does that help? Ronan e: [EMAIL PROTECTED] t: 01903 739 997 w: www.thelittledot.com The

Re: [PHP-DB] Select statement drops 10th digit during table lookup?

2003-06-13 Thread Jason Wong
On Friday 13 June 2003 15:48, G E Holt wrote: I hope this is something easy I am overlooking but here goes: I have a table called: country which has the following fields: FieldType ip_from double(11,0) ip_todouble(11,0) country_code

Re: [PHP-DB] Select statement drops 10th digit during table lookup?

2003-06-13 Thread Ronan Chilvers
Here's how I did it when playing with this... Table definition:- CREATE TABLE ip_list ( ip_from double default NULL, ip_to double default NULL, country_code char(2) default NULL, country_name varchar(100) default NULL, KEY ip_from (ip_from,ip_to,country_code,country_name) )

Re: [PHP-DB] Select statement drops 10th digit during table lookup?

2003-06-13 Thread Doug Thompson
Why not use the built-in conversion functions in mysql? From the manual: quote INET_NTOA(expr) Given a numeric network address (4 or 8 byte), returns the dotted-quad representation of the address as a string: mysql SELECT INET_NTOA(3520061480); - 209.207.224.40 INET_ATON(expr) Given

[PHP-DB] mysql statement: two tables, two comparisons

2003-03-06 Thread Jason End
I'm looking for a mysql select statement that does the following: - Check if the value of each expert.id on the table experts matches a value expt.id in the table apliexpert. - For those values where this is true check whether the softID value for that row matches the variable $softId. - return

RE: [PHP-DB] mysql statement: two tables, two comparisons

2003-03-06 Thread Beverly Steiner
; -- Beverly Steiner [EMAIL PROTECTED] -Original Message- From: Jason End [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2003 8:52 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] mysql statement: two tables, two comparisons I'm looking for a mysql select statement that does the following

[PHP-DB] If Statement thanks

2003-02-26 Thread Chris Payne
Hi there everyone, Thank you all for your answer - DOH I can't believe I missed something so simple :-) Regards Chris

Re: [PHP-DB] LIKE statement

2002-11-03 Thread Peter Beckman
change your query to this: select count(distinct itemid) from business where name like 'word1 word2 word3%' or description like 'word1 word2 word3%'; Peter On 4 Nov 2002, Chris Barnes wrote: Hi, I've got a dilly of a problem. I'm probably doing something wrong but I don't know what. I'm

RE: [PHP-DB] LIKE statement or IN statement?

2002-11-03 Thread Amit_Wadhwa
if you want to search for multiple words, u have to use multiple like operators: select count(distinct itemid) from business where name like 'word1' or name like 'word2' or name like 'word3'; or the IN statement with wildcards: select count(distinct itemid) from business where name IN

RE: [PHP-DB] LIKE statement or IN statement?

2002-11-03 Thread Chris Barnes
Yeah I really need to search for multiple words. Can anyone confirm if the IN statement will work for me in this situation? On Mon, 2002-11-04 at 09:31, [EMAIL PROTECTED] wrote: if you want to search for multiple words, u have to use multiple like operators: select count(distinct itemid) from

RE: [PHP-DB] LIKE statement or IN statement?

2002-11-03 Thread John W. Holmes
You can't use wildcards with IN, only with LIKE or regular expressions. ---John Holmes... -Original Message- From: [EMAIL PROTECTED] [mailto:Amit_Wadhwa;Dell.com] Sent: Sunday, November 03, 2002 5:31 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] LIKE statement or IN statement

Re: [PHP-DB] LIKE statement or IN statement?

2002-11-03 Thread David Jackson
Chris Barnes wrote: Yeah I really need to search for multiple words. Can anyone confirm if the IN statement will work for me in this situation? Chris -- Why not just try it you self and let's us know. Also check to MySQL doc at http://mysql.org David On Mon, 2002-11-04 at 09:31, [EMAIL

RE: [PHP-DB] LIKE statement or IN statement?

2002-11-03 Thread Amit_Wadhwa
expressions. ---John Holmes... -Original Message- From: [EMAIL PROTECTED] [mailto:Amit_Wadhwa;Dell.com] Sent: Sunday, November 03, 2002 5:31 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] LIKE statement or IN statement? if you want to search for multiple words, u have to use multiple

RE: [PHP-DB] LIKE statement or IN statement?

2002-11-03 Thread John W. Holmes
ok so you would have to use : --select count(distinct itemid) from business where name like 'word1' or name like 'word2' or name like 'word3'; no other go. If you're not going to use wildcards, then you can use IN. The whole idea of using LIKE is that you can use _ and % as wildcards when

RE: [PHP-DB] select statement

2002-10-25 Thread Michael Hazelden
What's the error? -Original Message- From: Steve Dodkins [mailto:Steve.Dodkins;ebm-ziehl.co.uk] Sent: 25 October 2002 16:46 To: Php-Db (E-mail) Subject: [PHP-DB] select statement Hi I get an error message with the following statement, if I remove the 'AND works_order_part_no

[PHP-DB] MySql Statement inside a function?

2002-10-18 Thread Dave Carrera
Hi All I have created a function and insde that function it dose a standard select, fetch_arry, while loop. I get a error from mysql saying not a vaild resource but if I take the statemnet out of the function all works fine and dandy. Are there things I should be aware of when trying to include

RE: [PHP-DB] MySql Statement inside a function?

2002-10-18 Thread Rob Day
you should return the results. hope that helps. -rob -Original Message- From: Dave Carrera [mailto:dave;davecarrera.com] Sent: Friday, October 18, 2002 10:52 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] MySql Statement inside a function? Hi All I have created a function and insde

RE: [PHP-DB] MySql Statement inside a function?

2002-10-18 Thread Hutchins, Richard
] Sent: Friday, October 18, 2002 11:52 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] MySql Statement inside a function? Hi All I have created a function and insde that function it dose a standard select, fetch_arry, while loop. I get a error from mysql saying not a vaild resource but if I

[PHP-DB] SELECT statement problem

2002-08-15 Thread Evan S. Weiner
Hello all, I have this SQL statement I am trying to use and no matter what combination I use, I cannot get it to work. The start and end if clauses need to be grouped together. SELECT * FROM tickets_work WHERE employee_id = '$tech_id' ( start '$start' end '$end' ) ORDER BY start Anyone

RE: [PHP-DB] SELECT statement problem

2002-08-15 Thread Hutchins, Richard
is MySQL) Rich -Original Message- From: Evan S. Weiner [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 2:15 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] SELECT statement problem Hello all, I have this SQL statement I am trying to use and no matter what combination I use, I cannot get

RE: [PHP-DB] SELECT statement problem

2002-08-15 Thread Evan S. Weiner
= $row[total_billable]; -Original Message- From: Miles Thompson [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 2:26 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] SELECT statement problem SELECT * FROM tickets_work WHERE employee_id = '$tech_id' AND start '$start

RE: [PHP-DB] SELECT statement problem

2002-08-15 Thread Miles Thompson
]; $total_billable = $row[total_billable]; -Original Message- From: Miles Thompson [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 2:26 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] SELECT statement problem SELECT * FROM tickets_work WHERE employee_id = '$tech_id' AND start

[PHP-DB] or statement in url

2002-07-18 Thread Matthew K. Gold
can I use an OR operator in a variable that is passed through a url? ex. how can I combine the following two lines so that I end up with records that have an id of either 1 or 2? http://www.xyz.com/foo.php?FooID=1 http://www.xyz.com/foo.php?FooID=2 (I tried the following, but it didn't work:

Re: [PHP-DB] or statement in url

2002-07-18 Thread Martin Clifford
Pass different variables and use them both in your query. http://www.xyz.com/foo.php?FooID=1 http://www.xyz.com/foo.php?Foo2ID=2 $query = SELECT * FROM table WHERE id=$FooID OR id=$Foo2ID; HTH Martin Clifford Homepage: http://www.completesource.net Developer's Forums:

Re: [PHP-DB] or statement in url

2002-07-18 Thread Steve Cayford
How about http://www.xyz.com/foo.php?FooID[]=1FooID[]=2 Then FooID will be an array of the values. -Steve On Thursday, July 18, 2002, at 03:20 PM, Matthew K. Gold wrote: can I use an OR operator in a variable that is passed through a url? ex. how can I combine the following two lines so

RE: [PHP-DB] or statement in url

2002-07-18 Thread Beau Lebens
// To: [EMAIL PROTECTED]; [EMAIL PROTECTED] // Subject: Re: [PHP-DB] or statement in url // // // Pass different variables and use them both in your query. // // http://www.xyz.com/foo.php?FooID=1 // http://www.xyz.com/foo.php?Foo2ID=2 // // $query = SELECT * FROM table WHERE id=$FooID OR id

[PHP-DB] sql statement via var

2002-05-26 Thread Dave Carrera
Hi All I am trying to load a mysql statement which i have tested and know to work from a var in my script. It is a create table statement. I have a good connection as a table list shows tables. I tried to echo my var but no joy Any ideas? Thanks in Advance Dave C -- PHP

[PHP-DB] JOIN statement not producing expected output

2002-05-20 Thread admin
Okay, now this is my first try on fetching data from two tables, and frankly I'm starting to pull my hair out ;) All I want is to fetch some data from two seperate tables in my database. So far I have tried different approches, and below is what I think should work, but doesn't :( SELECT *

[PHP-DB] JOIN statement not producing expected output

2002-05-20 Thread admin
Okay, now this is my first try on fetching data from two tables, and frankly I'm starting to pull my hair out ;) All I want is to fetch some data from two seperate tables in my database. So far I have tried different approches, and below is what I think should work, but doesn't :( SELECT *

Re: [PHP-DB] JOIN statement not producing expected output

2002-05-20 Thread Bogdan Stancescu
Well, the first question is what's the expected output? If you're trying to get, say, title from table1 and rating from table2 and identify the books in table1 by the unique field id and in table2 by the field book_id, then this is what you should have to end up with: SELECT t1.title,

Re: [PHP-DB] JOIN statement not producing expected output

2002-05-20 Thread szii
://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#SELECT 'Luck -Szii - Original Message - From: admin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, May 20, 2002 5:48 PM Subject: [PHP-DB] JOIN statement not producing expected output Okay, now this is my first try

[PHP-DB] If statement for sql statement

2002-04-09 Thread jas
Ok here is my question... I have a form that reads the contents of a directory, places the resulting files into a select box within a form for further processing, code is as follows: ?php $dir_name = /virtual/path/to/images/directory/; $dir = opendir($dir_name); $file_list .= pFORM METHOD=\post\

Re: [PHP-DB] If statement for sql statement

2002-04-09 Thread Jason Wong
On Wednesday 10 April 2002 12:32, jas wrote: Ok here is my question... I have a form that reads the contents of a directory, places the resulting files into a select box within a form for further processing, code is as follows: [snip] What I need to know is if there is a way to create an if

RE: [PHP-DB] include() statement hell!

2002-03-28 Thread Jonathan Hilgeman
: [PHP-DB] include() statement hell! Thanks Jonathan, I'm trying to include a file /includes/dblib.inc from /main/page.php. In /main/page.php I use include(includes/dblib.inc);. When that didn't work, I tried copying the file to /main/ and including it there and that didn't work either. Finally

RE: [PHP-DB] include() statement hell!

2002-03-28 Thread JD Daniels
PROTECTED] Subject: RE: [PHP-DB] include() statement hell! So, maybe this is the question. Can you include a file from /main/page.php by using a path of /includes/dblib.inc? Probably not. PHP can see the whole filesystem, not just the area that is limited to your account. So, when you try

Re: [PHP-DB] include() statement hell!

2002-03-28 Thread Brad Melendy
om: Brad Melendy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 2002 7:27 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] include() statement hell! Thanks Jonathan, I'm trying to include a file /includes/dblib.inc from /main/page.php. In /main/page.php I use include(includes/dblib.inc)

  1   2   >