Hi,
Why this doesn't work ?
---
$query = SELECT COUNT (login) FROM WHERE login = '$login';
$result = mysql_query($query);
mysql_fetch_row($result);
---
It gives me
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL
result resource in /var/www/html/registar_action.php on line
It looks to me like you forgot to specify the table in your query:
SELECT COUNT (login) FROM TABLENAME GOES HERE WHERE login = '$login'
Hi,
Why this doesn't work ?
---
$query = SELECT COUNT (login) FROM WHERE login = '$login';
$result = mysql_query($query);
mysql_fetch_row($result);
---
Hi,
Sorry, i do have the table name.
It just passed me while transcripting.
The code is:
---
$query = SELECT COUNT (login) FROM formacao WHERE login = '$login';
$result = mysql_query($query);
mysql_fetch_row($result);
---
It works perfectly on MySQL prompt.
Regards,
Mário Gamito
Colin
[snip]
---
$query = SELECT COUNT (login) FROM formacao WHERE login = '$login';
$result = mysql_query($query);
mysql_fetch_row($result);
---
[/snip]
mysql_query() requires a connections resource
$result = mysql_query($query, $myConnection);
--
PHP General Mailing List (http://www.php.net/)
To
[snip]
---
$query = SELECT COUNT (login) FROM formacao WHERE login = '$login';
$result = mysql_query($query);
mysql_fetch_row($result);
---
[/snip]
mysql_query() requires a connections resource
$result = mysql_query($query, $myConnection);
The connection resource is optional. It
$query = SELECT COUNT (login) FROM formacao WHERE login = '$login';
$result = mysql_query($query);
Make this line instead
$result = mysql_query($query) or die(mysql_error() . with the query $query;
and you'll likely see the error.
--
Scott Noyes
[EMAIL PROTECTED]
--
PHP General Mailing List
[snip]
$query = SELECT COUNT (login) FROM formacao WHERE login = '$login';
$result = mysql_query($query);
mysql_fetch_row($result);
The connection resource is optional. It will use the most recent connection
if not specified.
[/snip]
Then try this
$query = SELECT COUNT (login) FROM
Hi,
Make this line instead
$result = mysql_query($query) or die(mysql_error() . with the query $query;
and you'll likely see the error.
Here it goes:
You have an error in your SQL syntax; check the manual that corresponds
to your MySQL server version for the right syntax to use near
why don't you just echo your $query to see if it is coming out
correctly, before even trying to mess with mysql_query()? I think you
should be able to see the problem from there.
Jordan
On Oct 24, 2005, at 12:44 PM, Mário Gamito wrote:
Hi,
Make this line instead
$result =
Hi,
Make this line instead
$result = mysql_query($query) or die(mysql_error() . with
the query $query;
and you'll likely see the error.
Here it goes:
You have an error in your SQL syntax; check the manual that
corresponds
to your MySQL server version for the right syntax to
ah!
remove the whitespace between the COUNT and () : COUNT(login) instead of
COUNT () ...
Hi,
Make this line instead
$result = mysql_query($query) or die(mysql_error() . with the query
$query;
and you'll likely see the error.
Here it goes:
You have an error in your SQL syntax;
On Mon, October 24, 2005 12:25 pm, Mário Gamito wrote:
---
$query = SELECT COUNT (login) FROM WHERE login = '$login';
$result = mysql_query($query);
mysql_fetch_row($result);
---
It gives me
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL
result resource in
Hi,
Hi have this bit of code:
-
echo
script language=\JavaScript\
window.location=\valid_cv_insert.php?email=$email\
/script;
-
but when passing to file valid_cv_insert.php, $email value
Mário Gamito wrote:
Hi,
Hi have this bit of code:
-
echo
script language=\JavaScript\
window.location=\valid_cv_insert.php?email=$email\
/script;
-
but when passing to file
Ave,
I tried:
forminput type=text name=emailINPUT type=submit value=SUbmit
name=Submit/form
?php
if($Submit) {
echo
script language=\JavaScript\
window.location=\delete.php?email=$email\
/script;
}
?
In a simple page. It worked absolutely fine... The value of $email was
passed along to
Mário Gamito wrote:
Hi,
hi,
the subject line of your post is not so good - make the subject relevant
to your question, asking 'why doesn't this work' is like asking 'why are we
here'.
its liable to get you either:
a, no answers.
b, answers like this one.
c, really useful answer like '42'
: John Nichel [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 05, 2004 8:20 PM
To: 'PHP Mailing Lists'
Subject: Re: [PHP] why this doesn't work as an external file but does
internally?
Aaron Wolski wrote:
Ok.. here are 3 links:
https://celestica.tristarpromotions.com/NEW/index2.php
This link
Hi guys,
I have this code Javascript code:
if (document.images) {
img1on = new Image(); img1on.src = ?php echo $base_url;
?Graphics/?php echo $img_home_on; ?;
img2on = new Image(); img2on.src = ?php echo $base_url;
?Graphics/?php echo $img_programdetails_on; ?;
img3on
Aaron Wolski wrote:
Hi guys,
I have this code Javascript code:
snip
When I include it in the main page it works without any problems. When I
link it as an external file it doesn't work.
As a side note, the following code example works in an external JS file:
img1off = new Image(); img1off.src =
[snip]
I have this code Javascript code:
[/snip]
And the web has these JavaScript lists! Quaint, no?
Anyhow, to make this work you will need to generate your JavaScript code
with PHP.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]
Sent: October 5, 2004 3:52 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] why this doesn't work as an external file but does
internally?
[snip]
And the web has these JavaScript lists! Quaint, no?
[/snip]
If you look
[snip]
If that was true then why does this work:
img1off = new Image(); img1off.src = ?php echo $base_url;
?Graphics/home_off.gif;
I certainly didn't generate it with PHP and it was included as an
external file.
[/snip]
If this is true then your problem is solved. if not
echo img1off =
Please reply to the list, and not just an individual person.
Aaron Wolski wrote:
-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED]
Sent: October 5, 2004 3:51 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] why this doesn't work as an external file but does
internally?
What
Hi guys,
I have this code Javascript code:
if (document.images) {
img1on = new Image(); img1on.src = ?php echo $base_url;
?Graphics/?php echo $img_home_on; ?;
img2on = new Image(); img2on.src = ?php echo $base_url;
?Graphics/?php echo $img_programdetails_on; ?;
snip
PROTECTED]
Subject: RE: [PHP] why this doesn't work as an external file but does
internally?
-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]
Sent: October 5, 2004 3:52 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] why this doesn't work as an external file but does
File with the JS code is called: jsstuff.php
Aaron
-Original Message-
From: Vail, Warren [mailto:[EMAIL PROTECTED]
Sent: October 5, 2004 4:12 PM
To: 'Aaron Wolski'; 'Jay Blanchard'; [EMAIL PROTECTED]
Subject: RE: [PHP] why this doesn't work as an external file but does
internally
-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED]
Sent: October 5, 2004 4:06 PM
To: PHP Mailing Lists
Subject: Re: [PHP] why this doesn't work as an external file but does
internally?
Please reply to the list, and not just an individual person.
No. I turn my
* Thus wrote Aaron Wolski:
What error messages are produced?
What does the remotely included file output?
Does the second variable have value?
Can you provide a link to where we can see the issue at play?
So on, and so forth.
Look at the source of your page that doesn't work,
Aaron Wolski wrote:
Ok.. here are 3 links:
https://celestica.tristarpromotions.com/NEW/index2.php
This link... you'll see that the rollover effects on the top menu work.
The external JS file (called: jsstuffnew.php) has code that looks like:
img1on = new Image(); img1on.src = ?php echo
Just to add a little fuel to the fire, the only way I've seen or been able
to get PHP and Apache 2 working together is by installing each from my Red
Hat 8.0 CD's. When I tried to compile each together, I got many an error.
When I start doing some actually web work on my testing server, I
may not follow, Don't walk behind me, I may not
lead, Just walk beside me, and be my friend. - Unknown
From: Tim Thorburn [EMAIL PROTECTED]
Date: Thu, 23 Jan 2003 05:03:00 -0500
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Why PHP doesn't work with Apache2?
Just to add a little fuel to the fire
Baskett [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Thursday, January 23, 2003 2:28 PM
Subject: Re: [PHP] Why PHP doesn't work with Apache2?
Ok I am hearing a bad rumor that Red Hat 8.0 and the Mac xserve both come
with Apache 2.. now is this a rumor or is this true?
If it's true
not follow, Don't walk behind me, I may
not lead, Just walk beside me, and be my friend. - Unknown
From: Tim Thorburn [EMAIL PROTECTED]
Date: Thu, 23 Jan 2003 05:03:00 -0500
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Why PHP doesn't work with Apache2?
Just to add a little fuel to the fire
PHP doesn't work with Apache2?
Just to add a little fuel to the fire, the only way I've seen or been able
to get PHP and Apache 2 working together is by installing each from my Red
Hat 8.0 CD's. When I tried to compile each together, I got many an error.
When I start doing some actually
I don't want to start a flame-war here, just asking for specifics on a
question I have :)
I know that PHP and Apache 2 (on Linux anyway) have some problems
working together. I was just wondering, for my own education, why is that?
Is it a problem in Apache 2 or in PHP? (Not that I want to lay
Apache2 now work with php in aspx (PHP is as a module)
-Original Message-
From: Jean-Christian Imbeault [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 22, 2003 6:06 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Why PHP doesn't work with Apache2?
I don't want to start a flame-war
Henry wrote:
Apache2 now work with php in aspx (PHP is as a module)
Really!? I was sure there were still some issues ...
Jc
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
, January 22, 2003 7:11 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Why PHP doesn't work with Apache2?
Henry wrote:
Apache2 now work with php in aspx (PHP is as a module)
Really!? I was sure there were still some issues ...
Jc
--
PHP General Mailing List (http://www.php.net
Henry wrote:
what issues for example?
I do know I can successful install php in module with apache2.0.43 without error messages, also execution was successful
can you tell me what issues did you see?
A successful install means nothing.
My question is basically, does Apache2 work with PHP 100%
it depends on you your aim
u can consider your criterias between php with apache 1.3X apache 2
if u try to use pragmatism about it ...
maybe u can find the result that php with apache 2 is better ?
so don't you need more argument ?
one more .
Yasin Inat wrote:
it depends on you your aim
Ok, to put it more simply,
Are there cases where something would work in Apache 1.3.27 + PHP that
would break in Apache2 + PHP??
A simple yes or no will suffice.
If the answer is no, I am curious as to why not ...
Thanks,
Jc
--
Henry wrote:
what issues for example?
I do know I can successful install php in module with apache2.0.43 without error
messages, also execution was successful
can you tell me what issues did you see?
A successful install means nothing.
My question is basically, does Apache2 work with
Rasmus Lerdorf wrote:
Because the server doesn't work very well yet. There are issues in the
filter api and you can't really uses a threaded mpm as many of the
3rd-party libraries that are commonly linked into PHP are simply not
threadsafe.
Thank you! That's the kind of answer I was looking
On Thu, 23 Jan 2003, Jean-Christian Imbeault wrote:
Rasmus Lerdorf wrote:
Because the server doesn't work very well yet. There are issues in the
filter api and you can't really uses a threaded mpm as many of the
3rd-party libraries that are commonly linked into PHP are simply not
Rasmus Lerdorf wrote:
No, you didn't understand correctly. I specifically said the thread
safety issues were in 3rd party libraries and not in PHP.
Sorry, I thought by 3rd party libraries you meant libraries that PHP is
dependent upon. Do you mean libraries used by PHP or Apache. And if
On Thu, 23 Jan 2003, Jean-Christian Imbeault wrote:
Rasmus Lerdorf wrote:
No, you didn't understand correctly. I specifically said the thread
safety issues were in 3rd party libraries and not in PHP.
Sorry, I thought by 3rd party libraries you meant libraries that PHP is
dependent
Hi to all,
I found this error in my code:
class BaseForm {
var $_fields;
var $_method;
var $_postedData;
var $_formAction;
function init($eMsgFile,$method,$formAction) {
...
...
Although the table con_inf in db sbwresearch contains 3 records with
username as the first column, the following short script generates a blank
page:
?php
$connection=mysql_connect(localhost,wagner,xyz) or die (No
connection!);
$db=mysql_select_db(sbwresearch,$connection) or die (No
If you only want the associative array, just use mysql_fetch_array($result). If
you're using the constant MYSQL_ASSOC, uppercase it, and don't quote it.
Although the table con_inf in db sbwresearch contains 3 records with
username as the first column, the following short script generates a
49 matches
Mail list logo