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 r

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='$thin

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

[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

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

2004-04-22 Thread Miles Thompson
Don't cross post -- you'll eventually annoy enough people that they'll stop responding! Here are some suggestions: Are you closing braces properly? (Assume you must be, otherwise errors would be thrown. Have you echoed your $cat_id so you know if you are getting? Use the in_array function to s

[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? //Show categories first $get_cats = "select id_num, id_name, descriptio

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 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

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:

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

2004-02-26 Thread Axel IS Main
e- From: Axel 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

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 Hutchins, Richard
thing 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&

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; > > $

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

2004-02-26 Thread Axel IS Main
lts 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 with this query? Ok, ok. I get the message a

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

2004-02-26 Thread Micah Stevens
t; >And check out what gets spit out to the browser when $sql is echoed? Maybe > >that'll point out something that's going wrong. If nothing is apparent, > > post the results of echo $sql back to the list and maybe one of us will > > find something. > > > >HTH.

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

2004-02-26 Thread jeffrey_n_Dyke
7;s going wrong. 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, Febr

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

2004-02-26 Thread Micah Stevens
eck out what gets spit out to the browser when $sql is echoed? Maybe > >that'll point out something that's going wrong. If nothing is apparent, > > post > > >the results of echo $sql back to the list and maybe one of us will find > >something. > > > >HTH.

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

2004-02-26 Thread Axel IS Main
ing that's going wrong. 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: PH

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

2004-02-26 Thread Micah Stevens
; >>> > >>>Most times, when I run into query problems, immediately before I send > >>> the query to the database, I'll echo the statement out to the browser > >>> so I can see the exact string that's being sent to the db. > >>

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

2004-02-26 Thread jeffrey_n_Dyke
gt;>>$sql = "INSERT INTO log SET term='$search', returns='$arrayword', >>>time=CURTIME(), date=CURDATE(), ip='$ip'"; >>> >>>echo $sql; >>> >>>$logit = mysql_query($sql) or >>> die(mysql_error());

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

2004-02-26 Thread Muhammed Mamedov
AIL PROTECTED]> To: "PHP-DB" <[EMAIL PROTECTED]> Sent: Thursday, 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, m

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

2004-02-26 Thread Viorel Dragomir
t; <[EMAIL PROTECTED]> Sent: Thursday, February 26, 2004 11:18 AM Subject: Re: [PHP-DB] What's wrong with this query? > What is the error? there i something i always do when i have this problem, > try this: > > error_reporting(E_ALL); > $sql = "INSERT INTO log SET t

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

2004-02-26 Thread Paul Fitz
Original Message- From: Axel 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 synt

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

2004-02-26 Thread Ricardo Lopes
in the middle, which could cause problems in your 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

[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 term='

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

2002-12-26 Thread Ryan Jameson (USA)
er 26, 2002 1:41 PM 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... 7) { echo "bad fg number"; } el

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... 7) { echo "bad fg number"; } else { $fgNumber =$switchfg ; echo $fgNumber; }} ?> This works... I added the echo statement in the last line for debugging purposes, the page does indee

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 // Subje

[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: This will wrap, but, it should work. TIA, Taj -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[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: This will wrap, but, it should work. TIA, Taj -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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 c

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 P

[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 th

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&

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 th

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

2002-01-27 Thread Work
usage... ... ... ... include ("menu.inc'); include_menu() ... ... ... Check your PHP.INI.. Or send more code!!! Dan - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, January 27, 2002 10:18 PM Subject: [PHP-DB] what'

[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 (folde

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

2001-11-20 Thread Dobromir Velev
older == trim($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 w

[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 "" . $info[0] . ""; The condition ($folder == $info[2]) is not working! I hope you can help me! Here's the code: http://www.automacao.eng.br";; $link_fo

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 0110301727.19453@reign">news:0110301727.19453

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

2001-10-30 Thread Jesse Goerz
On Tuesday 30 October 2001 15:49, TorrentUK wrote: > 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 >

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: > > > > you either need to pass the variables to the function or use global > variables in the

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

2001-10-30 Thread Leotta, Natalie (NCI/IMS)
ng out the $sql and see what you're getting - 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: [EM

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

2001-10-30 Thread Charles F. McKnight
On Tue, 30 Oct 2001, TorrentUK wrote: 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 > function RatingFilter () { >

[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 code...

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 > /www/affiliate/include/func

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 f

[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 = mysql_connect("$HOST","$MYSQL_USERNAME","$MYSQL_PASSWORD

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

2001-02-16 Thread Matt Williams
> $link = mysql_connect ("localhost", "www", "scripts4") or die ("Could not > connect"); > $db = mysql_select_db ("schileens_db") or die ("Could not select > database"); > ?> > Weekday events > > > # make function # > function display_events () > { > # declare global variable coming from oth

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

2001-02-16 Thread Hoover, Josh
process for you. KnowledgeStorm - Your IT Search Starts Here > -Original Message- > From: Timothy Wright [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 16, 2001 10:01 AM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] What's wrong with this code? > > > Hello - &g

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

2001-02-16 Thread Timothy Wright
Hello - I'm not getting any errors on this... and the variable is passing from the form on the other page, but I'm getting empty result sets when I know there should be data. Weekday events \n", $row["msg_year"], $row["msg_month"], $row["msg_day"], $row["msg_title"]); } mysql