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
--- 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
$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
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
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
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
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
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
; [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:
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
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
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&
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;
>
> $
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
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.
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
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.
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
; >>>
> >>>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.
> >>
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());
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
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
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
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
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='
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
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
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
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
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
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
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
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
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&
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
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'
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
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
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
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
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
>
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
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
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 () {
>
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...
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
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
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
> $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
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
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
51 matches
Mail list logo