[PHP-DB] What's wrong with this QUERY??

2004-07-22 Thread Harry G
Hi, I have a database with members details and PK is id. $thing = [EMAIL PROTECTED]; $query = SELECT id, email, familyname FROM members WHERE email=$thing; $result = mysql_query($query); If i do a query where id=$thing. and $thing=20; this works fine and I get the desired result. But what is

Re: [PHP-DB] What's wrong with this QUERY??

2004-07-22 Thread Larry E . Ullman
$thing = [EMAIL PROTECTED]; $query = SELECT id, email, familyname FROM members WHERE email=$thing; You need to quote non-numeric values in SQL. It should be $query = SELECT id, email, familyname FROM members WHERE email=''$thing'; Also, you don't really need to select the email value since you

Re: [PHP-DB] What's wrong with this QUERY??

2004-07-22 Thread zareef ahmed
--- Harry G [EMAIL PROTECTED] wrote: Hi, I have a database with members details and PK is id. $thing = [EMAIL PROTECTED]; $query = SELECT id, email, familyname FROM members WHERE email=$thing; Make it $query = SELECT id, email, familyname FROM members WHERE email='$thing'; It should

Re: [PHP-DB] What's wrong with this QUERY??

2004-07-22 Thread Jason Wong
On Friday 23 July 2004 10:57, Harry G wrote: I have a database with members details and PK is id. $thing = [EMAIL PROTECTED]; $query = SELECT id, email, familyname FROM members WHERE email=$thing; $query = SELECT id, email, familyname FROM members WHERE email='$thing'; Please refer to

[PHP-DB] What's wrong with this IF statement?

2004-04-22 Thread Robert Sossomon
My IF statement should be picking up on the numbers, and if the number matches not be displaying out the information, however I look at the outputted page and the information is still there, what have I got wrong on the code? CODE SNIPPET //Show categories first $get_cats = select id_num,

[PHP-DB] What's wrong with this query?

2004-02-26 Thread Axel IS Main
I've just tried to do something I've done a thousand times. It does not work. I've checked all of the syntax, made sure the field and variable names are correct. No matter what I do it just doesn't work. The table remains empty. Here's the query: $logit = mysql_query(INSERT INTO log SET

Re: [PHP-DB] What's wrong with this query?

2004-02-26 Thread Ricardo Lopes
script. If you can't see the problem after this post the output of this code. - Original Message - From: Axel IS Main [EMAIL PROTECTED] To: PHP-DB [EMAIL PROTECTED] Sent: Thursday, February 26, 2004 9:05 AM Subject: [PHP-DB] What's wrong with this query? I've just tried to do something

RE: [PHP-DB] What's wrong with this query?

2004-02-26 Thread Paul Fitz
IS Main [mailto:[EMAIL PROTECTED] Sent: Thursday, February 26, 2004 7:06 PM To: PHP-DB Subject: [PHP-DB] What's wrong with this query? I've just tried to do something I've done a thousand times. It does not work. I've checked all of the syntax, made sure the field and variable names are correct

Re: [PHP-DB] What's wrong with this query?

2004-02-26 Thread Muhammed Mamedov
, February 26, 2004 11:05 AM Subject: [PHP-DB] What's wrong with this query? I've just tried to do something I've done a thousand times. It does not work. I've checked all of the syntax, made sure the field and variable names are correct. No matter what I do it just doesn't work. The table remains

Re: [PHP-DB] What's wrong with this query?

2004-02-26 Thread Axel IS Main
[mailto:[EMAIL PROTECTED] Sent: Thursday, February 26, 2004 2:37 PM To: PHP DB Subject: Re: [PHP-DB] What's wrong with this query? Ok, ok. I get the message about the syntax. Since I've used this syntax for a long time and so far there hasn't been a problem I'll assume that's not the problem. I

RE: [PHP-DB] What's wrong with this query?

2004-02-26 Thread brett king
; [EMAIL PROTECTED]; PHP DB Subject: Re: [PHP-DB] What's wrong with this query? exactly, i'm using it for more than a year - Original Message - From: Erwin Kerk [EMAIL PROTECTED] To: [EMAIL PROTECTED]; PHP DB [EMAIL PROTECTED] Sent: Thursday, February 26, 2004 5:36 PM Subject: Re: [PHP-DB

Re: [PHP-DB] What's wrong with this query?

2004-02-26 Thread Axel IS Main
PROTECTED] Sent: Thursday, February 26, 2004 7:06 PM To: PHP-DB Subject: [PHP-DB] What's wrong with this query? I've just tried to do something I've done a thousand times. It does not work. I've checked all of the syntax, made sure the field and variable names are correct. No matter what I do it just

RE: [PHP-DB] What's wrong with this query?

2004-02-26 Thread Hutchins, Richard
to the list and maybe one of us will find something. HTH. Rich -Original Message- From: Axel IS Main [mailto:[EMAIL PROTECTED] Sent: Thursday, February 26, 2004 2:37 PM To: PHP DB Subject: Re: [PHP-DB] What's wrong with this query? Ok, ok. I get the message about the syntax. Since I've

Re: [PHP-DB] What's wrong with this query?

2004-02-26 Thread Axel IS Main
[mailto:[EMAIL PROTECTED] Sent: Thursday, February 26, 2004 2:37 PM To: PHP DB Subject: Re: [PHP-DB] What's wrong with this query? Ok, ok. I get the message about the syntax. Since I've used this syntax for a long time and so far there hasn't been a problem I'll assume that's not the problem. I

Re: [PHP-DB] What's wrong with this query?

2004-02-26 Thread Micah Stevens
. If nothing is apparent, post the results of echo $sql back to the list and maybe one of us will find something. HTH. Rich -Original Message- From: Axel IS Main [mailto:[EMAIL PROTECTED] Sent: Thursday, February 26, 2004 2:37 PM To: PHP DB Subject: Re: [PHP-DB] What's wrong

Re: [PHP-DB] What's wrong with this query?

2004-02-26 Thread jeffrey_n_Dyke
To: PHP DB Subject: Re: [PHP-DB] What's wrong with this query? Ok, ok. I get the message about the syntax. Since I've used this syntax for a long time and so far there hasn't been a problem I'll assume that's not the problem. I will, however, review this and probably make some changes

Re: [PHP-DB] What's wrong with this query?

2004-02-26 Thread Micah Stevens
will find something. HTH. Rich -Original Message- From: Axel IS Main [mailto:[EMAIL PROTECTED] Sent: Thursday, February 26, 2004 2:37 PM To: PHP DB Subject: Re: [PHP-DB] What's wrong with this query? Ok, ok. I get the message about the syntax. Since I've used this syntax

Re: [PHP-DB] What's wrong with this query?

2004-02-26 Thread Micah Stevens
$sql back to the list and maybe one of us will find something. HTH. Rich -Original Message- From: Axel IS Main [mailto:[EMAIL PROTECTED] Sent: Thursday, February 26, 2004 2:37 PM To: PHP DB Subject: Re: [PHP-DB] What's wrong with this query? Ok, ok. I get the message about

Re: [PHP-DB] What's wrong with this query?

2004-02-26 Thread jeffrey_n_Dyke
Message- From: Axel IS Main [mailto:[EMAIL PROTECTED] Sent: Thursday, February 26, 2004 2:37 PM To: PHP DB Subject: Re: [PHP-DB] What's wrong with this query? Ok, ok. I get the message about the syntax. Since I've used this syntax for a long time and so far there hasn't been a problem I'll

RE: [PHP-DB] What's wrong with this query?

2004-02-26 Thread Daniel Clark
What about the single quotes? Might try this. $sql = INSERT INTO log SET term=\'$search\', returns=\'$arrayword\', time=CURTIME(), date=CURDATE(), ip=\'$ip\'; $sql = INSERT INTO log SET term='$search', returns='$arrayword', time=CURTIME(), date=CURDATE(), ip='$ip'; echo $sql; $logit =

Re: [PHP-DB] What's wrong with this query?

2004-02-26 Thread Axel IS Main
Ok, ok. I get the message about the syntax. Since I've used this syntax for a long time and so far there hasn't been a problem I'll assume that's not the problem. I will, however, review this and probably make some changes for the sake of compliance if nothing else. In any event, the syntax is

Re: [PHP-DB] What's wrong with this query?

2004-02-26 Thread Nitin Mehta
exactly, i'm using it for more than a year - Original Message - From: Erwin Kerk [EMAIL PROTECTED] To: [EMAIL PROTECTED]; PHP DB [EMAIL PROTECTED] Sent: Thursday, February 26, 2004 5:36 PM Subject: Re: [PHP-DB] What's wrong with this query? Viorel Dragomir wrote: I'm using MySQL

Re: [PHP-DB] What's wrong with this query?

2004-02-26 Thread Erwin Kerk
Viorel Dragomir wrote: I'm using MySQL for about 2 years and never heard about this kind of INSERT. Is not SQL compliant neither. YOU CAN NOT MAKE : INSERT INTO table SET var=1 [as I know] As a matter of fact it IS possible, according to the MySQL manual on http://www.mysql.com/doc/en/INSERT.html

Re: [PHP-DB] What's wrong with my update query select works, but updatedoesn't?

2002-12-26 Thread Michael Knauf/Niles
Here's the code: with some extraneous html removed to make it easier to read... ? require('connect.php') ? ? /* check for a request to display a new fg number and if so make sure the data is good if the fg number is good it is used for all other data queries */ $fgNumber=; if ($switchfg

RE: [PHP-DB] What's wrong with my update query select works, but update doesn't?

2002-12-26 Thread Ryan Jameson (USA)
To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] What's wrong with my update query select works, but update doesn't? Here's the code: with some extraneous html removed to make it easier to read... ? require('connect.php') ? ? /* check for a request to display a new fg number and if so make sure

[PHP-DB] What's wrong with this code?

2002-09-01 Thread Shoulder to Shoulder Farm
Hi all, I'm running PHP4. What's wrong with this code: ? $db = mysql_connect(localhost, Taj, wyethia); mysql_select_db(s2s,$db); mysql_query(INSERT INTO prod VALUES ( 'Name', 'ShortDesc', 'LongDesc', 'PriceOZ', 'PriceLB', 'URLOZ', 'URLLB', 'IMG') VALUES ('$_POST[Name]', '$_POST[ShortDesc]',

[PHP-DB] What's wrong with this code?

2002-09-01 Thread Shoulder to Shoulder Farm
Hi all, I'm running PHP4. What's wrong with this code: ? $db = mysql_connect(localhost, Taj, passwordhere); mysql_select_db(s2s,$db); mysql_query(INSERT INTO prod VALUES ( 'Name', 'ShortDesc', 'LongDesc', 'PriceOZ', 'PriceLB', 'URLOZ', 'URLLB', 'IMG') VALUES ('$_POST[Name]',

RE: [PHP-DB] What's wrong with this code?

2002-09-01 Thread Beau Lebens
I'd use var inclusions like this; VALUES (' . $_POST['Name'] . ', that might help you // -Original Message- // From: Shoulder to Shoulder Farm [mailto:[EMAIL PROTECTED]] // Sent: Monday, 2 September 2002 11:42 AM // To: PHP Database List // Subject: [PHP-DB] What's wrong

[PHP-DB] what's wrong with this ereg?

2002-08-20 Thread chip . wiegand
I am trying an email verification function, like this: if (empty($useremail)) || !eregi(^[A-Za-z0-9\_-]+@[A-Za-z0-9\_-] +.[A-Za-z0-9\_-]+.*, $email)) { $errmsg .= The email address appears to be invalid\n; } But it will not work, on one server I get this

Re: [PHP-DB] what's wrong with this ereg?

2002-08-20 Thread Steve Cayford
Well, one thing is you've got mismatched parentheses. You need another another opening paren right after the if. Also, don't you need to escape the last hyphen in your character sets? As well as the . before the third character set? -Steve On Tuesday, August 20, 2002, at 11:11 AM, [EMAIL

Re: [PHP-DB] what's wrong with this ereg?

2002-08-20 Thread chip . wiegand
Steve Cayford [EMAIL PROTECTED] wrote on 08/20/2002 10:28:46 AM: Well, one thing is you've got mismatched parentheses. You need another another opening paren right after the if. Also, don't you need to escape the last hyphen in your character sets? As well as the . before the third

[PHP-DB] what's wrong with this?

2002-01-27 Thread Ali Nayeri
hi all i've been trying this script for a day and i just can't figure out why it doesn't work. could someone check and see if there is something i did wrong? the error is unknown function include_menu() which actually exist in the menu.inc file. this is the structure: home.php includes

RE: [PHP-DB] what's wrong with this?

2002-01-27 Thread Ali Nayeri
i'm not sure why the files didn't come through. i'll try again. -Original Message- From: Ali Nayeri [mailto:[EMAIL PROTECTED]] Sent: January 27, 2002 8:18 PM To: PHP Database Mailing List Subject: [PHP-DB] what's wrong with this? hi all i've been trying this script for a day and i

RE: [PHP-DB] what's wrong with this?

2002-01-27 Thread Ali Nayeri
can't you attach files in this mailing list? is there a special way? could someone tell me. Thanks -Original Message- From: Ali Nayeri [mailto:[EMAIL PROTECTED]] Sent: January 27, 2002 8:27 PM To: PHP Database Mailing List Subject: RE: [PHP-DB] what's wrong with this? i'm not sure

[PHP-DB] What's wrong?

2001-11-20 Thread Sergio Augusto Bitencourt Petrovcic
Ho there...I really wonder what's wrong with this script. The error is in this line below: if((count($info) != 1) ($folder == $info[2])) echo tabletrtda href= . $info[1] . . $info[0] . /abr/td/tr/table; The condition ($folder == $info[2]) is not working! I hope you can help me! Here's the code:

Re: [PHP-DB] What's wrong?

2001-11-20 Thread Dobromir Velev
($info[2])) HTH Dobromir Velev -Original Message- From: Sergio Augusto Bitencourt Petrovcic [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Tuesday, November 20, 2001 13:58 Subject: [PHP-DB] What's wrong? Ho there...I really wonder what's wrong with this script. The error

Re: [PHP-DB] What's wrong with my function? :(

2001-10-31 Thread Torrent
Tx. Yep I have read it now and understood it better than the first time I read this part of the manual (it's amazing how things make more sense when you can apply them to what you are doing). Jesse Goerz [EMAIL PROTECTED] wrote in message

[PHP-DB] What's wrong with my function? :(

2001-10-30 Thread TorrentUK
Please could some take a look at this code and tell me why when I take my IF statements out of the function and put in them in the same place where I call the function from they work, but as soon as I replace them with the function name they don't? Appreciate any help. torrent Here's the

Re: [PHP-DB] What's wrong with my function? :(

2001-10-30 Thread Charles F. McKnight
On Tue, 30 Oct 2001, TorrentUK wrote: SNIP you either need to pass the variables to the function or use global variables in the function see http://www.php.net/manual/en/language.variables.scope.php Here's the code... // Define the rating's filter ?php function RatingFilter () {

RE: [PHP-DB] What's wrong with my function? :(

2001-10-30 Thread Leotta, Natalie (NCI/IMS)
- possibly at different stages of the program - like before and after you call your function. Good luck! -Natalie -Original Message- From: TorrentUK [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, October 30, 2001 3:50 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] What's wrong with my

Re: [PHP-DB] What's wrong with my function? :(

2001-10-30 Thread TorrentUK
Yep, that'll be it. Thanks for the help. :) torrent Charles F. McKnight [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Tue, 30 Oct 2001, TorrentUK wrote: SNIP you either need to pass the variables to the function or use global variables in the

[PHP-DB] What's wrong with this code?

2001-03-26 Thread Emir Musabasic
Hi, I really need help, I wrote a function so that I can call for db user/password in an include file. It looks like this: // Connect to the database function db_connect(){ global $MYSQL_USERNAME, $MYSQL_PASSWORD, $DB, $HOST; $db =

RE: [PHP-DB] What's wrong with this code?

2001-03-26 Thread Brunner, Daniel
Hello... Try mysql_pconnect instead Dan -- From: Emir Musabasic Sent: Monday, March 26, 2001 9:34 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] What's wrong with this code? Hi, I really need help, I wrote a function so that I can call for db user

Re: [PHP-DB] What's wrong with this code?

2001-03-26 Thread CC Zona
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Emir Musabasic) wrote: I have user/password/host variables inside a config file but for some reason when I include this into a php page when I test it, I get: Fatal error: Cannot redeclare db_connect() in