Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Jochem Maas
Dan Joseph schreef: On Wed, Sep 17, 2008 at 2:17 PM, Vinny Gullotta <[EMAIL PROTECTED]>wrote: ... $i[servername] Try: $i['servername'] notice the ' and ' around the name. I've heard you can do w/o those, but I've had issues in the past where it didn't work. ITs also good practice to us

Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Vinny Gullotta
That was it!!! Thank you all so much for your help!!! =D ""Dan Joseph"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On Wed, Sep 17, 2008 at 4:30 PM, Vinny Gullotta <[EMAIL PROTECTED]>wrote: If by key you mean the column in the database, it's called: servername "Micah Gerste

Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Micah Gersten
I meant key in the array that was returned by MySQL. I answered you in my other post. The array was numerically index based instead of column based. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Vinny Gullotta wrote: > If by key you mean the column in the

Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Dan Joseph
On Wed, Sep 17, 2008 at 4:30 PM, Vinny Gullotta <[EMAIL PROTECTED]>wrote: > If by key you mean the column in the database, it's called: servername > > "Micah Gersten" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > What is the key for the server name? That's what you need when

Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Micah Gersten
That's your problem, you need to use mysql_fetch_assoc instead of mysql_fetch_row. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Vinny Gullotta wrote: > var_dump looks like this: > > array(2) { [0]=> string(9) "wehost006" [1]=> string(2) "72" } array(2) > {

Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Vinny Gullotta
If by key you mean the column in the database, it's called: servername "Micah Gersten" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] What is the key for the server name? That's what you need when you output it. Thank you, Micah Gersten onShore Networks Internal Developer http://

Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Vinny Gullotta
var_dump looks like this: array(2) { [0]=> string(9) "wehost006" [1]=> string(2) "72" } array(2) { [0]=> string(8) "H7848-49" [1]=> string(2) "71" } array(2) { [0]=> string(7) "H7853-2" [1]=> string(2) "70" } array(2) { [0]=> string(7) "H7842-2" [1]=> string(2) "64" } array(2) { [0]=> string(9

Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Dan Joseph
On Wed, Sep 17, 2008 at 4:21 PM, Vinny Gullotta <[EMAIL PROTECTED]>wrote: > var_dump($i); looks messy, but I can see the server names in there and they > are the correct names. > > > "Micah Gersten" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Do var_dump($i) in the loop to s

Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Micah Gersten
What is the key for the server name? That's what you need when you output it. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Vinny Gullotta wrote: > var_dump($i); looks messy, but I can see the server names in there and > they are the correct names. > > > "

Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Vinny Gullotta
var_dump($i); looks messy, but I can see the server names in there and they are the correct names. "Micah Gersten" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Do var_dump($i) in the loop to see if you're getting the data you want. Thank you, Micah Gersten onShore Networks Int

Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Vinny Gullotta
""Dan Joseph"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On Wed, Sep 17, 2008 at 2:17 PM, Vinny Gullotta <[EMAIL PROTECTED]>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 displa

Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Micah Gersten
Do var_dump($i) in the loop to see if you're getting the data you want. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Vinny Gullotta wrote: > Still no luck displaying the stupid servername. Any other things I can > try? > > > "Micah Gersten" <[EMAIL PROTECT

Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Dan Joseph
On Wed, Sep 17, 2008 at 2:17 PM, Vinny Gullotta <[EMAIL PROTECTED]>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 >

Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Vinny Gullotta
Still no luck displaying the stupid servername. Any other things I can try? "Micah Gersten" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] You'll want to change your Order By statement to 'ORDER BY CountSteps DESC'. Thank you, Micah Gersten onShore Networks Internal Developer ht

Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Micah Gersten
You'll want to change your Order By statement to 'ORDER BY CountSteps DESC'. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Vinny Gullotta wrote: > echo $query; > > yields > > SELECT servername, COUNT(steps) as CountSteps FROM monitoring WHERE > steps = 'IIS

Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Vinny Gullotta
""Dan Joseph"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On Wed, Sep 17, 2008 at 2:30 PM, Vinny Gullotta <[EMAIL PROTECTED]>wrote: ""Dan Joseph"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On Wed, Sep 17, 2008 at 2:17 PM, Vinny Gullotta <[EMAIL PROTECTED]

Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Dan Joseph
On Wed, Sep 17, 2008 at 2:30 PM, Vinny Gullotta <[EMAIL PROTECTED]>wrote: > ""Dan Joseph"" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > On Wed, Sep 17, 2008 at 2:17 PM, Vinny Gullotta <[EMAIL PROTECTED] >> >wrote: >> >> What I want to do is find the top 10 servers where the

Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Vinny Gullotta
""Dan Joseph"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On Wed, Sep 17, 2008 at 2:17 PM, Vinny Gullotta <[EMAIL PROTECTED]>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 displa

Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Dan Joseph
On Wed, Sep 17, 2008 at 2:17 PM, Vinny Gullotta <[EMAIL PROTECTED]>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 >

[PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Vinny Gullotta
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 steps are the important col

Re: [PHP] php and mysql date mapping question

2006-10-10 Thread Jochem Maas
Dave Goodchild wrote: > Hi all, I am in the process of creating a national events directory where > people can enter their events (car boot sales, evening classes etc) and > specify whether those events are one-ff events or repeating (daily, weekly > etc) affairs and people can search for those eve

[PHP] php and mysql date mapping question

2006-10-10 Thread Dave Goodchild
Hi all, I am in the process of creating a national events directory where people can enter their events (car boot sales, evening classes etc) and specify whether those events are one-ff events or repeating (daily, weekly etc) affairs and people can search for those events by postcode, date range,

Re: [PHP] PHP and mySQL dates

2006-09-15 Thread Richard Lynch
On Wed, September 13, 2006 5:56 am, Dave Goodchild wrote: > Hi all. I am building an online events registry and have mapped out > all the > dates between Oct 1 2006 and Dec 31 2030, stored in the database as > timestamps incremented by 86400 to give daily slots. I have output the > values using the

Re: [PHP] PHP and mySQL dates

2006-09-13 Thread Dave Goodchild
Good luck with that. > -- http://www.web-buddha.co.uk http://www.projectkarma.co.uk -- http://www.web-buddha.co.uk http://www.projectkarma.co.uk

RE: [PHP] PHP and mySQL dates

2006-09-13 Thread Peter Lauri
No problem, now I will go and make my girlfriend happy :) -Original Message- From: Dave Goodchild [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 13, 2006 6:27 PM To: Peter Lauri Cc: PHP General Subject: Re: [PHP] PHP and mySQL dates Thanks. I have been so up close and personal

Re: [PHP] PHP and mySQL dates

2006-09-13 Thread Dave Goodchild
Thanks. I have been so up close and personal with this that I can't see the wood for the trees. Of course, so obvious. Thank you - you have made me very happy. -- http://www.web-buddha.co.uk http://www.projectkarma.co.uk

RE: [PHP] PHP and mySQL dates

2006-09-13 Thread Peter Lauri
[snip] Hi all. I am building an online events registry and have mapped out all the dates between Oct 1 2006 and Dec 31 2030, stored in the database as timestamps incremented by 86400 to give daily slots. [/snip] I do not really understand the purpose of mapping all dates between Oct 1 2006 and De

[PHP] PHP and mySQL dates

2006-09-13 Thread Dave Goodchild
Hi all. I am building an online events registry and have mapped out all the dates between Oct 1 2006 and Dec 31 2030, stored in the database as timestamps incremented by 86400 to give daily slots. I have output the values using the php date function and all is well. Users can enter either one-off

Re: [PHP] PHP and mySQL getting smashed...

2006-05-18 Thread Richard Lynch
On Wed, May 17, 2006 6:55 am, Russell Jones wrote: > I have a site that is getting 30K+ traffic daily and it is smashing > mySQL - > any ideas on what to do to make the mysql connections more efficient, > or > anything in general. No bandwidth issue here, just the server getting > killed. It depen

Re: [PHP] PHP and mySQL getting smashed...

2006-05-17 Thread Jochem Maas
Jay Blanchard wrote: [snip] I have a site that is getting 30K+ traffic daily and it is smashing mySQL - any ideas on what to do to make the mysql connections more efficient, or anything in general. No bandwidth issue here, just the server getting killed. [/snip] Without seeing any code or table

Re: [PHP] PHP and mySQL getting smashed...

2006-05-17 Thread Alister Bulman
On 17/05/06, Dave Goodchild <[EMAIL PROTECTED]> wrote: I have a site that is getting 30K+ traffic daily and it is smashing mySQL - > any ideas on what to do to make the mysql connections more efficient, or > anything in general. No bandwidth issue here, just the server getting > killed. > > ...I

RE: [PHP] PHP and mySQL getting smashed...

2006-05-17 Thread Jay Blanchard
[snip] I have a site that is getting 30K+ traffic daily and it is smashing mySQL - any ideas on what to do to make the mysql connections more efficient, or anything in general. No bandwidth issue here, just the server getting killed. [/snip] Without seeing any code or table information my bet woul

Re: [PHP] PHP and mySQL getting smashed...

2006-05-17 Thread Angelo Zanetti
perhaps post some code so we can look at how you doing your queries... HTH Angelo Zanetti Z Logic www.zlogic.co.za [c] +27 72 441 3355 [t] +27 21 469 1052 [f] +27 86 681 5885 Dave Goodchild wrote: I have a site that is getting 30K+ traffic daily and it is smashing mySQL - any ideas on what t

Re: [PHP] PHP and mySQL getting smashed...

2006-05-17 Thread Dave Goodchild
I have a site that is getting 30K+ traffic daily and it is smashing mySQL - any ideas on what to do to make the mysql connections more efficient, or anything in general. No bandwidth issue here, just the server getting killed. ...I may be wrong but using persistent connections (mysql_pconnect) m

[PHP] PHP and mySQL getting smashed...

2006-05-17 Thread Russell Jones
I have a site that is getting 30K+ traffic daily and it is smashing mySQL - any ideas on what to do to make the mysql connections more efficient, or anything in general. No bandwidth issue here, just the server getting killed. Thanks

Re: [PHP] PHP and MySQL and resouce limits

2005-07-21 Thread Richard Lynch
On Wed, July 20, 2005 5:22 pm, John Hinton said: > I don't get it... I have been upping my memory limit for PHP. 32megs > now... and am making calls to a database on a different server. I see > the loads run up on the other server as it cruches the numbers.. and PHP > is in the process of creating

Re: [PHP] PHP and MySQL and resouce limits

2005-07-20 Thread Matt Darby
John Hinton wrote: I don't get it... I have been upping my memory limit for PHP. 32megs now... and am making calls to a database on a different server. I see the loads run up on the other server as it cruches the numbers.. and PHP is in the process of creating a single little page with about

[PHP] PHP and MySQL and resouce limits

2005-07-20 Thread John Hinton
I don't get it... I have been upping my memory limit for PHP. 32megs now... and am making calls to a database on a different server. I see the loads run up on the other server as it cruches the numbers.. and PHP is in the process of creating a single little page with about 40 numbers on it, fro

[PHP] PHP and MySQL Installation on Apache for Windows

2004-07-15 Thread Sean Vasey
Does anyone know how to get PHP to detect MySQL after it has been installed and is running on an Apache 1.3.1 server for Windows? Any help would be greatly appreciated.

RE: [PHP] php and mysql help

2004-04-17 Thread David Robley
Friday, April 16, 2004 12:41 PM > To: Jay Blanchard > Subject: RE: [PHP] php and mysql help > > > Please remove my address from any future correspondence about PHP. > Jay, you are confusing persons at a university with persons who may have a Clue [TM] David (also recipient

RE: [PHP] php and mysql help

2004-04-16 Thread Jay Blanchard
Why are you sending this to me? You're at Stanford, you can probably figure out the unsubscribe link and stuff -Original Message- From: David A. Stevens [mailto:[EMAIL PROTECTED] Sent: Friday, April 16, 2004 12:41 PM To: Jay Blanchard Subject: RE: [PHP] php and mysql help Please r

RE: [PHP] php and mysql help

2004-04-14 Thread Jay Blanchard
[snip] 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. [/snip] http://www.php.net/mysql_create_db You're welcome. -- PHP General

Re: [PHP] php and mysql help

2004-04-14 Thread Curt Zirzow
* Thus wrote webmaster ([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. You just need to issue a create database

[PHP] php and mysql help

2004-04-14 Thread webmaster
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.

Re: [PHP] PHP and MySQL date

2003-12-15 Thread Website Managers.net
CTED]> Sent: Monday, December 15, 2003 5:23 PM Subject: [PHP] PHP and MySQL date | 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 quest

[PHP] PHP and MySQL date

2003-12-15 Thread Cesar Aracena
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 times in a MySQL DB for PH

RE: [PHP] PHP and MySQL problem, please help

2003-11-18 Thread Jay Blanchard
[snip] A query in mysql become with STATE set to STATISTICS and all queries after this query are LOCKED.What is the decision please. [/snip] The decision is to ask for a better description if possible, along with some of the suspected code. -- PHP General Mailing List (http://www.php.net/) To un

[PHP] PHP and MySQL problem, please help

2003-11-18 Thread Mr. Bogomil Shopov
hi folks, A query in mysql become with STATE set to STATISTICS and all queries after this query are LOCKED. What is the decision please. Best Regards Bogomil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP and MYSQL don't shake hands

2003-09-18 Thread CPT John W. Holmes
From: "Frank Tudor" <[EMAIL PROTECTED]> > The problem I am having is that when I try to pass values to the > database the php fails. > > I think I have singled it down to the connection string but I am > not sure. [snip] > function db_connect() { >global $dbhost, $dbusername, $dbuserpassword,

[PHP] PHP and MYSQL don't shake hands

2003-09-18 Thread Frank Tudor
Guys, I have moved from a foxserv(apache, php, mysql, all in one install tool) windows test environment to a Linux apache php mysql setup specifically mandrake linux production server. The problem I am having is that when I try to pass values to the database the php fails. I think I have singled

[PHP] PHP and MYSQL

2003-07-07 Thread Bob G
Please help I am going quite mad. I am trying to install PHP-4. I purchased the PHP and MySQL web development book to this end. I am running under Win2000 and IIS. I downloaded from the PHP web site to get the latest versions. I first tried to do a manual installation but this appeared to fail so

Re: [PHP] PHP and Mysql Limit

2003-07-02 Thread ed
On Wed, 2 Jul 2003, Jeff Harris wrote: > Then, once you've done it enough times, $start = $count = 178. > [code] > while ($start <= $count) { > // when $start = $count = 178, you won't retrive any data > [/code] The recordset would not alway contain an even number of records resulting in 10 re

Re: [PHP] PHP and Mysql Limit

2003-07-02 Thread ed
t;[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, July 02, 2003 9:23 AM > Subject: [PHP] PHP and Mysql Limit > > > > > > I've created a script that reads a sorted mysql query and outputs specific > > results into text files defined by th

Re: [PHP] PHP and Mysql Limit

2003-07-02 Thread Jeff Harris
|- Original Message - |From: <[EMAIL PROTECTED]> |To: <[EMAIL PROTECTED]> |Sent: Wednesday, July 02, 2003 9:23 AM |Subject: [PHP] PHP and Mysql Limit | | |> |> I've created a script that reads a sorted mysql query and outputs specific |> results into text file

Re: [PHP] PHP and Mysql Limit

2003-07-02 Thread Chris Sherwood
It looks like your adding 10 to 8 thus getting 18... of course I maybe looking at this wrong - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 02, 2003 9:23 AM Subject: [PHP] PHP and Mysql Limit > > I've created a scr

[PHP] PHP and Mysql Limit

2003-07-02 Thread ed
I've created a script that reads a sorted mysql query and outputs specific results into text files defined by the start and limit of mysql. The database holds 178 records. I want to start my output on #9 with 10 records per page. Should leave me with 17 equal pages right? $count = 178 $start = 8;

RE: [PHP] PHP and MYSQL record locking

2003-06-04 Thread John W. Holmes
> We have a multi-user database we use for telemarketing. It is used across > the internet. All the pages are PHP, I am trying to lock or keep other > users > from accessing the same record, so that they do not call the same lead. > For > example, the user selects a zip code to work from and then a

[PHP] PHP and MYSQL record locking

2003-06-04 Thread Jason May
We have a multi-user database we use for telemarketing. It is used across the internet. All the pages are PHP, I am trying to lock or keep other users from accessing the same record, so that they do not call the same lead. For example, the user selects a zip code to work from and then a lead pops u

[PHP] php and mysql

2003-03-31 Thread Tyler Durdin
I have a db with events in it. i would like to pull the events out via php, but i would like them to be ordered by month number (1-12). When I do this (Select blah blah From blah Order By Month_Start ASC) it orders the months by number, but it starts with october (month 10) I am pretty sure it i

Re: [PHP] PHP and MySQL Full Text Search Problem

2003-03-13 Thread Ray Hunter
Since you are using fulltext search it is going to look for the exact spelling of what you pass in. If you wanted to get matches with Chris then you will want to modify your query by using LIKE. In version 4.0.1 of mysql you can do fulltext search in boolean mode. http://www.mysql.com/doc/en/Ful

[PHP] PHP and MySQL Full Text Search Problem

2003-03-13 Thread Charles Kline
Hi all, My first try at MySQL Full Text Search and it is not behaving ;) Here is what I have for my query string: $sql = "SELECT id, concat(fname, ' ', lname, ' ', degree1) as name". " FROM tbl_personnel WHERE MATCH (fname,lname) AGAINST ('" . $attributes['searchstring'] . "')"; Th

RE: [PHP] php and mysql

2003-02-20 Thread Kelly Protsko
look like this SELECT * from Table order by column_name Limit 100 This will bring back 100 rows that are order by the column you specify. Kelly -Original Message- From: Tyler Durdin [mailto:[EMAIL PROTECTED]] Sent: February 20, 2003 10:45 AM To: [EMAIL PROTECTED] Subject: [PHP] php and

Re: [PHP] php and mysql

2003-02-20 Thread David Otton
On Thu, 20 Feb 2003 17:44:51 +, you wrote: >When using a php script to pull recorda from a db how can I cut the records >at 1/4 of the total and arrange them alaphabetically according to a certain >field? Thanks in advance. http://www.mysql.com/doc/en/SELECT.html LIMIT and ORDER BY. This

[PHP] php and mysql

2003-02-20 Thread Tyler Durdin
When using a php script to pull recorda from a db how can I cut the records at 1/4 of the total and arrange them alaphabetically according to a certain field? Thanks in advance. _ MSN 8 helps eliminate e-mail viruses. Get 2 mont

Re: [PHP] PHP and MySQL bug

2003-01-04 Thread Michael J. Pawlowsky
I cant give you a solution, and I''m running on Linux. But I have pages were I do 6-7 queries on one page always using the same connection. Never had a problem with that. Mike *** REPLY SEPARATOR *** >I'm using PHP and MySQL to make my programs. But I think I discovered a bug >

[PHP] PHP and MySQL bug

2003-01-04 Thread Nuno Lopes
Dear Sirs, I'm using PHP and MySQL to make my programs. But I think I discovered a bug in PHP or in MySQL (I don't know!). In one of my files I have the following: MYSQL_CONNECT("localhost", "**user**", "**pass**"); mysql_select_db("be"); $r=MYSQL_QUERY("SELECT n,u,m,h FROM d WHERE id='$id'");

RE: [PHP] PHP and MySQL queries

2002-12-19 Thread Rich Gray
TED]] Sent: 18 December 2002 20:28 To: PHP General Subject: [PHP] PHP and MySQL queries Hi, I am having a real problem with variables in PHP and trying to query my MySQL database. I have a form that a user inputs information and then that info is used to query my database, but it's not work

RE: [PHP] PHP and MySQL queries

2002-12-18 Thread John W. Holmes
www.phparch.com/ > -Original Message- > From: Beauford.2002 [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, December 18, 2002 11:28 PM > To: PHP General > Subject: [PHP] PHP and MySQL queries > > Hi, > > I am having a real problem with variables in PHP and trying to query

[PHP] PHP and MySQL queries

2002-12-18 Thread Beauford.2002
Hi, I am having a real problem with variables in PHP and trying to query my MySQL database. I have a form that a user inputs information and then that info is used to query my database, but it's not working. I don't get any errorrs and it appears every thing worked, but nothing gets displayed (see

Re: [PHP] PHP and MySQL

2002-12-11 Thread Jason Wong
On Thursday 12 December 2002 09:22, BABA Yoshihiko wrote: > Jason Wong wrote: > > Not sure why you're escaping the single quote. It's unnecessary -- and I > > suspect you mis-escaped $select as well. Any you can use this format, > > which IMHO, is a lot easier on the eyes: > > > > $sql = "INSERT IN

Re: [PHP] PHP and MySQL

2002-12-11 Thread BABA Yoshihiko
Jason Wong wrote: Not sure why you're escaping the single quote. It's unnecessary -- and I suspect you mis-escaped $select as well. Any you can use this format, which IMHO, is a lot easier on the eyes: $sql = "INSERT INTO `guest` SET `title` = '$title', `fir

Re: [PHP] PHP and MySQL

2002-12-11 Thread Pushpinder Singh Garcha
Thanks Jason...that werked fine for me.. --pS On Wednesday, December 11, 2002, at 03:50 PM, Jason Wong wrote: On Thursday 12 December 2002 04:30, Pushpinder Singh Garcha wrote: Hello, I am using PHP to create forms and then am entering the user input into a MySQL DB In the first query I am

Re: [PHP] PHP and MySQL

2002-12-11 Thread Jason Wong
On Thursday 12 December 2002 04:30, Pushpinder Singh Garcha wrote: > Hello, > > I am using PHP to create forms and then am entering the user input into > a MySQL DB > In the first query I am trying to select the values that the user > entered on the form > > THIS DOES NOT WERK gives error unab

Re: [PHP] PHP and MySQL

2002-12-11 Thread Kevin Stone
x27;, '$login', '$password', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NOW())"; -Kevin - Original Message - From: "Pushpinder Singh Garcha" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, December 11, 2002 1:30 PM Su

Re: [PHP] PHP and MySQL

2002-12-11 Thread Stephen
ssage - From: "Pushpinder Singh Garcha" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, December 11, 2002 3:30 PM Subject: [PHP] PHP and MySQL Hello, I am using PHP to create forms and then am entering the user input into a MySQL DB In the first query I am tryi

[PHP] PHP and MySQL

2002-12-11 Thread Pushpinder Singh Garcha
Hello, I am using PHP to create forms and then am entering the user input into a MySQL DB In the first query I am trying to select the values that the user entered on the form THIS DOES NOT WERK gives error unable to execute query $sql = "INSERT INTO `guest` (`title`, `first_name`, `las

RE: [PHP] PHP and MySQL sorting using COUNT

2002-11-13 Thread Steve Edberg
PROTECTED]> wrote: try '... ,count(*) as count ...' then you should be able to reference it as $row['count'] HTH Rich -Original Message- From: [EMAIL PROTECTED] [mailto:ed@;home.homes2see.com] Sent: 13 November 2002 13:44 To: [EMAIL PROTECTED] Subject: [PHP] PHP and MySQL so

Re: [PHP] PHP and MySQL sorting using COUNT

2002-11-13 Thread @ Edwin
Hello, <[EMAIL PROTECTED]> wrote: > > I'm sorting records using COUNT with the following mysql command > > $result = mysql_query ("SELECT company_name, agent_name, count(*) FROM > $cur_listings GROUP BY company_name, agent_name"); > > Running this in MySQL does exactly what I need it to do but

[PHP] PHP and MySQL sorting using COUNT

2002-11-13 Thread ed
I'm sorting records using COUNT with the following mysql command $result = mysql_query ("SELECT company_name, agent_name, count(*) FROM $cur_listings GROUP BY company_name, agent_name"); Running this in MySQL does exactly what I need it to do but how do I echo the COUNT portion of the array? I k

Re: [PHP] PHP and MySQL

2002-08-02 Thread Jason Wong
On Saturday 03 August 2002 04:13, Erich Kolb wrote: > Is there any way to speed up MySQL queries? 1) Use a faster computer 2) Read the mysql manual 3) Ask on the mysql list 4) Ask google -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web D

RE: [PHP] PHP and MySQL

2002-08-02 Thread Shane
-Original Message- here any way to speed up MySQL queries? -- Sure, ask for only the data you need. or halt your query when you have what you need. HTH -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP and MySQL

2002-08-02 Thread Erich Kolb
Is there any way to speed up MySQL queries? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] PHP and MySQL

2002-05-17 Thread Craig Vincent
> You do realise, you have just pasted your database connection details to > the world?! I gonna have to write an article on how to communicate > securely over the internet. (not just with PHP, but with the data you > communicate in the messages as well!!) Well not quite, she did post her usernam

Re: [PHP] PHP and MySQL

2002-05-17 Thread Dan Hardiker
Hi, [..] > $user = "OMMITTED"; > $pass = "OMMITTED"; > $db = "Book Store1"; > $local = "OMMITED"; > $link = mysql_connect( "$local", $user, $pass ); [..] You do realise, you have just pasted your database connection details to the world?! I gonna have to write an article on how to communicat

[PHP] PHP and MySQL

2002-05-17 Thread City Colleges of Chicago - Mannheim
I just wanted to thank everyone for helping me with the script for my school project. But, of course I must esp. thank JODY, (the man!!). Go ahead Jody, eat up the glory! :) Renee Here is part of the script in its final form if anyone is interested: "; }

Re: [PHP] PHP and MySQL

2002-05-16 Thread Miguel Cruz
On Thu, 16 May 2002, City Colleges of Chicago - Mannheim wrote: > > 1 > 2 > 3 > 4 > 5 > 6 > 7 > 8 > 9 > 10 > This wasn't your question, but... $i"; ?> miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] PHP and MySQL

2002-05-16 Thread Craig Vincent
Missed a spot =) > if( $booktitle AND "quantity" ){ I'm not certain if this if statement is accurate. I've never used a statement like this but from the looks of it the AND "quantity" part would always be true (assuming it parses it). This could be adding to your problem as well. I think you

RE: [PHP] PHP and MySQL

2002-05-16 Thread Craig Vincent
> mysql_select_db( $db, $link ) > > or die ( "Couldn't open the $db: ".mysql_error() ); > > > if ($submit){ > > if( $booktitle AND "quantity" ){ > > $sql = "UPDATE Book2 SET stock ='$stock-quantity' WHERE > booktitle='$booktitle' AND quantity=quantity"; > > } Easy enough =) You're not running t

[PHP] PHP and MySQL

2002-05-16 Thread City Colleges of Chicago - Mannheim
My program is no longer giving a parse error, but my database is not being updated (as far as the stock numbers are concerned). Any ideas??? I made the changes below per a few people on the list: Quantity of books: 1 2 3 4 5 6 7 8 9 10 The book you are ordering: Additional Mes

RE: [PHP] PHP and mySQL

2002-05-14 Thread J Smith
Actually, "elseif" and "else if" are both valid. J Craig Vincent wrote: > > }else if(!$submit){ > > > Acthough you didn't show 75 lines of code my guess would be your problem > lies here. The else and the if shouldn't have a space between them. > > } elseif(!$submit){ > > See how that w

RE: [PHP] PHP and mySQL

2002-05-14 Thread Craig Vincent
> You are missing a " before $booktitle. > old:booktitle=$booktitle AND quantity=quantity"; > new:booktitle="$booktitle AND quantity=quantity"; So you're saying $sql = "UPDATE Book2 SET stock ='$stock-quantity' WHERE booktitle="$booktitle AND quantity=quantity"; is the correct SQL statement? M

RE: [PHP] PHP and mySQL

2002-05-14 Thread Craig Vincent
}else if(!$submit){ Acthough you didn't show 75 lines of code my guess would be your problem lies here. The else and the if shouldn't have a space between them. } elseif(!$submit){ See how that works for you =) Also your SQL is faulty $sql = "UPDATE Book2 SET stock ='$stoc

Re: [PHP] PHP and mySQL

2002-05-14 Thread webmaster
t;[EMAIL PROTECTED]> Sent: Tuesday, May 14, 2002 8:51 PM Subject: Re: [PHP] PHP and mySQL > On Tuesday 14 May 2002 18:38, City Colleges of Chicago - Mannheim wrote: > > I am getting a parse error on line 75. I am trying to say: > > > > if there is a booktitle and a quantity c

Re: [PHP] PHP and mySQL

2002-05-14 Thread Jason Wong
On Tuesday 14 May 2002 18:38, City Colleges of Chicago - Mannheim wrote: > 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. if ($booktitle AND $quantity) { ... > $u

[PHP] PHP and mySQL

2002-05-14 Thread City Colleges of Chicago - Mannheim
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 "; } ?>

[PHP] PHP and mySQL

2002-05-13 Thread City Colleges of Chicago - Mannheim
I am a student working on a practicum problem. I have a mySQL database that contains the books, their title, and how many are in stock. When a person orders one of the books, I want the stock to be adjusted by how many, quantity, that they chose when the submit button is clicked. The scripts are

Re: [PHP] PHP and mySQL...

2002-04-05 Thread Miguel Cruz
On Fri, 5 Apr 2002, Anthony Ritter wrote: > Any idea what the cost is for the ISP to install mySQL on their end so that > I can utilize my database that I've set up on localhost? MySQL is free for that sort of usage, so it only costs their time. If they've done it before, it takes about 5 minute

Re: [PHP] PHP and mySQL...

2002-04-05 Thread Anthony Ritter
Cyberskydive wrote in message: > Since you didnt make it clear, do you even have MySql and php on your > server? Are you looking to just move your data or looking to get php & mysql > installed on the server as well? (SERVER = production site, not localhost) ... Yes. I have

Re: [PHP] PHP and mySQL...

2002-04-05 Thread cyberskydive
Since you didnt make it clear, do you even have MySql and php on your server? Are you looking to just move your data or looking to get php & mysql installed on the server as well? (SERVER = production site, not localhost) if you just wanna move data, like everyone else said phpmyadmin rocks, but

Re: [PHP] PHP and mySQL...

2002-04-04 Thread Miguel Cruz
On Thu, 4 Apr 2002, Anthony Ritter wrote: > Sorry if my original question was confusing. > > This is what I would like to accomplish: > > I am currently developing a database on my website using mysql which is on > my harddrive. > I have installed Apache as well and I am using PHP. > > My datab

  1   2   >