[PHP] Why this doesn't work ?

2005-10-24 Thread Mário Gamito
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

Re: [PHP] Why this doesn't work ?

2005-10-24 Thread Colin Shreffler
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); ---

Re: [PHP] Why this doesn't work ?

2005-10-24 Thread Mário Gamito
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

RE: [PHP] Why this doesn't work ?

2005-10-24 Thread Jay Blanchard
[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

RE: [PHP] Why this doesn't work ?

2005-10-24 Thread Jim Moseby
[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

[PHP] Why this doesn't work ?

2005-10-24 Thread Scott Noyes
$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

RE: [PHP] Why this doesn't work ?

2005-10-24 Thread Jay Blanchard
[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

Re: [PHP] Why this doesn't work ?

2005-10-24 Thread Mário Gamito
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

Re: [PHP] Why this doesn't work ?

2005-10-24 Thread Jordan Miller
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 =

RE: [PHP] Why this doesn't work ?

2005-10-24 Thread Jim Moseby
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

Re: [PHP] Why this doesn't work ?

2005-10-24 Thread Phillip Oertel
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;

Re: [PHP] Why this doesn't work ?

2005-10-24 Thread Richard Lynch
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

[PHP] Why this doesn't work ?

2005-05-24 Thread Mário Gamito
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

Re: [PHP] Why this doesn't work ?

2005-05-24 Thread John Nichel
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

Re: [PHP] Why this doesn't work ?

2005-05-24 Thread Rahul S. Johari
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

Re: [PHP] Why this doesn't work ?

2005-05-24 Thread Jochem Maas
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'

RE: [PHP] why this doesn't work as an external file but does inte rnally?

2004-10-06 Thread Vail, Warren
: 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

[PHP] why this doesn't work as an external file but does internally?

2004-10-05 Thread Aaron Wolski
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

Re: [PHP] why this doesn't work as an external file but does internally?

2004-10-05 Thread John Nichel
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 =

RE: [PHP] why this doesn't work as an external file but does internally?

2004-10-05 Thread Jay Blanchard
[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

RE: [PHP] why this doesn't work as an external file but does internally?

2004-10-05 Thread Aaron Wolski
-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

RE: [PHP] why this doesn't work as an external file but does internally?

2004-10-05 Thread Jay Blanchard
[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 =

Re: [PHP] why this doesn't work as an external file but does internally?

2004-10-05 Thread John Nichel
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

Re: [PHP] why this doesn't work as an external file but does internally?

2004-10-05 Thread Matthew Sims
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

RE: [PHP] why this doesn't work as an external file but does inte rnally?

2004-10-05 Thread Vail, Warren
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

RE: [PHP] why this doesn't work as an external file but does internally?

2004-10-05 Thread Aaron Wolski
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

RE: [PHP] why this doesn't work as an external file but does internally?

2004-10-05 Thread Aaron Wolski
-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

Re: [PHP] why this doesn't work as an external file but does internally?

2004-10-05 Thread Curt Zirzow
* 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,

Re: [PHP] why this doesn't work as an external file but does internally?

2004-10-05 Thread John Nichel
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

Re: [PHP] Why PHP doesn't work with Apache2?

2003-01-23 Thread Tim Thorburn
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

Re: [PHP] Why PHP doesn't work with Apache2?

2003-01-23 Thread Richard Baskett
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

Re: [PHP] Why PHP doesn't work with Apache2?

2003-01-23 Thread Joseph W. Goff
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

Re: [PHP] Why PHP doesn't work with Apache2?

2003-01-23 Thread Evan Nemerson
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

Re: [PHP] Why PHP doesn't work with Apache2?

2003-01-23 Thread Richard Ellerbrock
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

[PHP] Why PHP doesn't work with Apache2?

2003-01-22 Thread Jean-Christian Imbeault
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

RE: [PHP] Why PHP doesn't work with Apache2?

2003-01-22 Thread Henry
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

Re: [PHP] Why PHP doesn't work with Apache2?

2003-01-22 Thread Jean-Christian Imbeault
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

RE: [PHP] Why PHP doesn't work with Apache2?

2003-01-22 Thread Henry
, 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

Re: [PHP] Why PHP doesn't work with Apache2?

2003-01-22 Thread Jean-Christian Imbeault
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%

Re: [PHP] Why PHP doesn't work with Apache2?

2003-01-22 Thread yasin inat
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 .

Re: [PHP] Why PHP doesn't work with Apache2?

2003-01-22 Thread Jean-Christian Imbeault
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 --

Re: [PHP] Why PHP doesn't work with Apache2?

2003-01-22 Thread Rasmus Lerdorf
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

Re: [PHP] Why PHP doesn't work with Apache2?

2003-01-22 Thread Jean-Christian Imbeault
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

Re: [PHP] Why PHP doesn't work with Apache2?

2003-01-22 Thread Rasmus Lerdorf
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

Re: [PHP] Why PHP doesn't work with Apache2?

2003-01-22 Thread Jean-Christian Imbeault
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

Re: [PHP] Why PHP doesn't work with Apache2?

2003-01-22 Thread Rasmus Lerdorf
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

[PHP] Why it doesn't work?

2003-01-07 Thread KidA
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) { ... ...

[PHP] Why while doesn't work?

2002-01-24 Thread Anthony Rodriguez
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

RE: [PHP] Why while doesn't work?

2002-01-24 Thread Matt Schroebel
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