Thanks all, I appreciate the follow ups and the help with the code. I'm
still relatively new with this stuff, and never had any formal training,
it's all just been learn as I go, and I have to learn fast as this project
is relatively urgent to get completed. I plan on going through all of my
co
1: SQL
in mysql queries /should/ use backticks (`) around database, table and
column names, stop's them getting confused with variables or reserved
words (like timestamp) and saves you future trouble :)
.. which is a mysql-ism - no other database supports this. As soon as
you need to use an
learn something new every day! cheers Micah :)
Micah Gersten wrote:
While it's true that '.' concatenates and ',' is a list separator, The
comma is actually more appropriate in this instance since you are just
outputting each piece. It saves the overhead of concatenation before
output.
Thank y
While it's true that '.' concatenates and ',' is a list separator, The
comma is actually more appropriate in this instance since you are just
outputting each piece. It saves the overhead of concatenation before
output.
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshor
Vinny Gullotta wrote:
What I want to do is find the top 10 servers where the column steps =
iisreset. The following code works great except that the page is not
displaying the servername in the 'Server Name' column of my results
(nothing appears, the column is just blank).
servername and step
> "SELECT id FROM dates WHERE FROM_UNIXTIME($date_string) = date"
>
> then
>
> "SELECT id FROM dates WHERE UNIX_TIMESTAMP(date) = $date_string"
>
> neither is working. Am I making some fundamental error here or missing
> something? Any help appreciated!
I know yui've alreayd solved this, but f
Upgrade your MySQL distribution to the latest version (5+).
Upgrade any shared MySQL libraries to the latest distribute.
Recompile MySQL with mysqli support.
http://php.net/mysqli
And use that instead of the regular MySQL functions.
That's what I did and it has made a huge diffe
PHP doesn't detect anything. You need to have your mysql server running and
you try with mysql_connect() or mysql_pconnect() to see if you can connect
to the server
"Sean Vasey" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Does anyone know how to get PHP to detect MySQL after it h
"Webmaster" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hello i need help with mysql_create_db i found the solution once but cant
remember what it was if someone could tell me the proper way to create a
database with php and mysql i would be greatly thankfull.
Thank you.
--
PHP
Cesar Aracena wrote:
I tried what both of you told me and I found very easy to use the datetime
value under MySQL and then fetch it using strtotime() as fireball at
sizzling dot com recommended at the "User Contributed Notes" of php.net's
function.date.php page rather than using mktime() which can
Thanks both of you for the answer.
I tried what both of you told me and I found very easy to use the datetime
value under MySQL and then fetch it using strtotime() as fireball at
sizzling dot com recommended at the "User Contributed Notes" of php.net's
function.date.php page rather than using mkti
Cesar Aracena wrote:
Hi all,
I'm making a site and need some tables from wich I can extract date, time
and/or date/time later with PHP and I neved had very clear the way the
possible formats work with each other so my question is what is the best (or
recommended) method to store dates and/or time
"Bob G" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Please help I am going quite mad.
> ... The PHP.INI file is in the PHP directory.
the php.ini in your PHP directory is useless
It needs to be in 1 of 3 places...
1) the IIS root directory, meaning where IIS EXE is at,
*n
Here is the script for what it's worth.
...
IS IT WORKING?
and the result is
IS IT WORKING?
are your trying to fool the list?
whate else do you expect than > when you write > ??
would ASP work if your write "<% [ASP-CODE] %>" ??
i think not,
in short just write < and
Assuming Month_Start is stored in MySQL date format (-mm-dd) you could
Select blah blah From blah Order By DATE_FORMAT(Month_Start,%m) ASC
The %m will pad on the zeroes.
http://www.mysql.com/doc/en/Date_and_time_functions.html
- Original Message -
From: "Tyler Durdin" <[EMAIL PROTECTE
QL List" <[EMAIL PROTECTED]>
Sent: Tuesday, January 07, 2003 4:12 PM
Subject: RE: [PHP] Re: PHP and MySQL bug
> Since nobody is jumping in to say it is some simple configuration/setting
> personally my next step would be to shut down all services on the box that
> aren't absol
t;MySQL List" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, January 07, 2003 5:06 PM
Subject: Re: [PHP] Re: PHP and MySQL bug
> @mysql_select_db("be"); -- this failed
> do echo mysql_error(); to see what went wrong
>
>
>
> Nuno Lopes wrote:
>
&
I'm using Windows 2000.
- Original Message -
From: "Cleber" <[EMAIL PROTECTED]>
To: "Nuno Lopes" <[EMAIL PROTECTED]>
Sent: Tuesday, January 07, 2003 10:23 AM
Subject: Re: [PHP] Re: PHP and MySQL bug
> Try add to /etc/hosts the name and ip of DB
'no db was selected')
- Original Message -
From: "David Freeman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, January 05, 2003 10:29 PM
Subject: RE: [PHP] Re: PHP and MySQL bug
> @MYSQL_QUERY("UPDATE d SET h='$h' WHERE id=
ED]>
Sent: Monday, January 06, 2003 6:28 PM
Subject: RE: [PHP] Re: PHP and MySQL bug
> This definitely sounds like a buggy installation or there may be some
> problem with the communication between the web server and the mysqld. Is
> the db on a different machine? Try using mysql_
It would be helpful if you posted that error. You can get it by changing
the die to
$queryr = mysql_query($query) or die(mysql_error());
Without knowing the error, you problem will be harder for everyone to debug.
-Original Message-
From: Nuno Lopes [mailto:[EMAIL PROTECTED]]
Sent: Mon
The problem is if I close the connection and reopen it the query is done,
but if I remain with the same connection has the previous query, mysql
returns an error.
- Original Message -
From: "Larry Brown" <[EMAIL PROTECTED]>
To: "MySQL List" <[EMAIL PROTECTED]>
Sent: Sunday, January 05, 20
To: <[EMAIL PROTECTED]>
Sent: Sunday, January 05, 2003 10:29 PM
Subject: RE: [PHP] Re: PHP and MySQL bug
>
> > @MYSQL_QUERY("UPDATE d SET h='$h' WHERE id='$id'"); // this
> > query doesn't work
>
> Personally, I'd call it bad
> @MYSQL_QUERY("UPDATE d SET h='$h' WHERE id='$id'"); // this
> query doesn't work
Personally, I'd call it bad programming practice to do a database update
and not check to see if it worked or not. In this case, how are you
determining that the query did not work? Are you manually checkin
Here is the source code:
Seleccione a localização para o download:Localização Principal";
if ($mirrors) {
echo " Mirrors";
$m=explode("»",$mirrors);
foreach ($m as $v) {
$m2=explode("!",$v);
echo "$m2[0]";
}
echo "Nota: Deve escolher o mirror mais próximo da sua localização,
para acelerar o dowloa
Personally I think the problem lies somewhere between the chair and the keyboard
(Sorry, couldn't resist) :-)
*** REPLY SEPARATOR ***
On 04/01/2003 at 4:58 PM Stefan Hinz, iConnect (Berlin) wrote:
>It doesn't work because of the /* Some code including ... */ part ;-)
>
Nuno,
> $r=MYSQL_QUERY("SELECT n,u,m,h FROM d WHERE id='$id'");
>
> /* Some code including "mysql_num_rows" and "mysql_fetch_array($r,
> MYSQL_NUM)"
> And the another query:
> */
>
> MYSQL_QUERY("UPDATE d SET h='$h' WHERE id='$id'");
>
> /* i don't know why but this doesn't work!*/
It doesn't wor
Personally I say get yourself a good simple dbconnect class and make life easy.
Also if you ever change users, database name etc, you onlu have one place to replace
it in your code.
I wrote mine based on http://www.vtwebwizard.com/tutorials/mysql/
Take a look at it. Nice and simple.
Mike
You really should be using a $link variable...it's good habit:
$link = mysql_connect(...);
mysql_select_db( "mydb" , $link);
$query = mysql_query( "select..." , $link );
$result = mysql_fetch_array($query);
Lewis
"Nuno Lopes" <[EMAIL PROTECTED]> wrote in message
003a01c2b3de$95004650$0100a8c0@pc
Indexes
Putting strings in single quotes instead of double (WHERE id = 'something')
Normalized database design.
- Monty
> From: [EMAIL PROTECTED] (Erich Kolb)
> Organization: R&B Receivables Management, Inc.
> Reply-To: "Erich Kolb" <[EMAIL PROTECTED]>
> Newsgroups: php.general
> Date: Fri, 2
"City Colleges Of Chicago - Mannheim" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> if there is a booktitle and a quantity chosen, then go to that booktitle
and
> adjust the quantity in the database.
0) {
$query =
"UPDATE Book2"
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] says...
> I am getting a parse error on line 75. I am trying to say:
>
> if there is a booktitle and a quantity chosen, then go to that booktitle and
> adjust the quantity in the database.
>
> Thanks!
> Renee
>
>
> $user = "adminer";
> $pas
o: [EMAIL PROTECTED]
> Subject: [PHP] Re: PHP and mySQL
>
> I presume that "quantity" is the number of books that the person has
> ordered, and therefore it needs to be a variable (ie with a $ infront
of
> it)
> and its also best to do the calculation outside of the SQL st
I presume that "quantity" is the number of books that the person has
ordered, and therefore it needs to be a variable (ie with a $ infront of it)
and its also best to do the calculation outside of the SQL statement just to
be sure it works, eg:
if ($submit){
if(isset($booktitle) && isset($quan
;\n";
}
}
mysql_free_result($result);
?>
-Original Message-
From: David Robley [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 8:29 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: PHP and mySQL
In article <180f01c1c403$2ac62820$[EMAIL PROTECTED]>,
[EMAIL
In article <180f01c1c403$2ac62820$[EMAIL PROTECTED]>,
[EMAIL PROTECTED] says...
> I have a little problem when trying to count the number of results returned
> in a mysql query. I was using mysql_num_rows() to do it with no problems,
> but this isn't as quick as using mySQL's COUNT(*), or so I ha
that is nix command. On window you need to start MySQL one of two ways.
http://www.mysql.com/doc/W/i/Windows.html
HTH
Gary
Morten Nielsen wrote:
> Hi,
>
> I try to use mySQL through PHP, but I can't get it to work.
> Both PHP and mySQL is installed on my computer (win2k). The PHP manual says
>
We have never used mysql_pconnect.
Regards,
Pieter Philippaerts
"Stefan De Wal" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> check your connection string and if it something like mysql_pconnect
change
> it in mysql_connect
>
> Stefan de Wal
--
PHP Gener
check your connection string and if it something like mysql_pconnect change
it in mysql_connect
Stefan de Wal
"Pieter Philippaerts" <[EMAIL PROTECTED]> schreef in bericht
([EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Unfortunately, I can't access these settings. It's not our computer that
> ho
Unfortunately, I can't access these settings. It's not our computer that
hosts
our website.
Regards,
Pieter Philippaerts
"Richard Lynch" <[EMAIL PROTECTED]> wrote in message
01e501c138ce$f3008300$6401a8c0@Lynchux100">news:01e501c138ce$f3008300$6401a8c0@Lynchux100...
> Options:
> Increase the set
Options:
Increase the settings in MySQL that limit how many databases can be open at
once.
Decrease the number of Apache children running.
Basically, as long as you have more Apache children than MySQL connections
available, you can get this message.
Actually, have a few spare MySQL connections,
Aloysius wrote:
> my mysql database just won't work .. i think i have configured it correctly cause i
>can see a page but the codes are messed up ..
> i can confirm that the servers supports php . both php and php3 extension because
>i've tried uploading simple codes and it appears correctly .
42 matches
Mail list logo