[PHP-DB] GROUP BY MONTH(DateBilled) misses an entry consistently

2002-01-11 Thread Mike Gifford
Hello I've got the following SQL Query, which consistently pulls up only 3 out of 4 months from the database: $sql = SELECT COUNT(DateBilled) AS count, MONTH(DateBilled) AS BilledMonth, YEAR(DateBilled) AS BilledYear FROM Invoices GROUP BY MONTH(DateBilled) ORDER BY DateBilled ASC; This

RE: [PHP-DB] MySQL Result Resource

2002-01-11 Thread matt stewart
shouldn't it be PASSWORD('madonna') ?? -Original Message- From: Necro [mailto:[EMAIL PROTECTED]] Sent: 11 January 2002 04:39 To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] MySQL Result Resource http://www.hotscripts.com/Detailed/4219.html --- that is the script But I cannot use crypt()

Re: [PHP-DB] GROUP BY MONTH(DateBilled) misses an entry consistently

2002-01-11 Thread DL Neil
Mike, Have you posted all of the relevant code - for example, how the 'result' is limited to three month's worth of data??? Have you extracted the SQL from the PHP and applied it directly to the command line or used it in a MySQL Management package? Was the result any different? Please advise,

Re: [PHP-DB] PHP blocks

2002-01-11 Thread Barry Rumsey
ones like phpnuke, myphpnuke, postnuke etc - Original Message - From: olinux [EMAIL PROTECTED] To: Barry Rumsey [EMAIL PROTECTED] Sent: Friday, January 11, 2002 7:26 PM Subject: Re: [PHP-DB] PHP blocks What portals? olinux --- Barry Rumsey [EMAIL PROTECTED] wrote: On

[PHP-DB] Create Table from a file in php

2002-01-11 Thread Dave Carrera
Hi All I want to create a table from a file that contains the sql to create the table. I have checked Mysql.com and have seen how to do it from telnet, but i want to do it from a php script. Can anyone please help. Thanks in Advance Dave C The two rules for success are: 1. Never tell them

RE: [PHP-DB] PHP4 + ODBC Openlink +ORACLE 8.1 on DIGITAL

2002-01-11 Thread Andrew Hill
Hi Christian, Could you please open a support case at www.openlinksw.com/support/suppindx.htm? Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message-

Re: [PHP-DB] GROUP BY MONTH(DateBilled) misses an entry consistently

2002-01-11 Thread Mike Gifford
Hello, Thanks for your quick reply.. I'm trying to improve the stats feature for gcdb (a pretty decent little PHP/MySQL accounting package on SF.net) On Fri, 2002-01-11 at 05:24, DL Neil wrote: Have you posted all of the relevant code - for example, how the 'result' is limited to three

[PHP-DB] Copying a MySQL Table

2002-01-11 Thread SpyProductions Support Team
How does one copy a Mysql table? I poked around on the mysql site and found conventions for renaming one, but nothing for duplicating a table (to a new table with a different name). Thanks, -Mike -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: [PHP-DB] GROUP BY MONTH(DateBilled) misses an entry consistently

2002-01-11 Thread Jason Wong
On Saturday 12 January 2002 00:20, Mike Gifford wrote: Hello, Thanks for your quick reply.. I'm trying to improve the stats feature for gcdb (a pretty decent little PHP/MySQL accounting package on SF.net) On Fri, 2002-01-11 at 05:24, DL Neil wrote: Have you posted all of the relevant

[PHP-DB] RE: display text in screen

2002-01-11 Thread Andrew Chase
Just add echo statments at whatever steps you want to display comment or detail for; something like: html headtitleSome page/title/head body ? echo Connecting to database: ; $dbconnection = @mysql_connect(localhost,username,password); if($dbconnection !== false){ echo OK; }else{

Re: [PHP-DB] Create Table from a file in php

2002-01-11 Thread Miles Thompson
I don't know how you would do it from a file off the top of my head, so let's invent it, in pseudocode, anyway. The important thing to remember is that all of the commands to create or alter tables / databases are SQL queries. So the mysql_query() function is used to do most of the work.

Re: [PHP-DB] GROUP BY MONTH(DateBilled) misses an entry consistently

2002-01-11 Thread Mike Gifford
It may have been obvious to many, but I stumbled across the solution (eventually).. Changing the while statement to a do statement did the trick: $sql = SELECT COUNT(DateBilled) AS count, MONTH(DateBilled) AS BilledMonth, YEAR(DateBilled) AS BilledYear FROM Invoices GROUP BY MONTH(DateBilled)

[PHP-DB] Iterate through Multi-Dimensional Arrays

2002-01-11 Thread Lerp
Hi all, I have a multidimesional array that holds consultants and their details. I've tried this a number of ways but to no avail. Could someone help me out iterating through the first and then the second array and display those results on my webpage. I messed it up pretty badly :( heh Here's

[PHP-DB] odbc and access

2002-01-11 Thread Berthelot
I want to connect to an access database via a dsn. Here is the code: ?php $db_link = odbc_connect(tatoo, , ); ? And I got the following error: Warning: SQL error: [Microsoft][Gestionnaire de pilotes ODBC] Source de données introuvable et nom de pilote non spécifié, SQL state IM002 in

RE: [PHP-DB] odbc and access

2002-01-11 Thread Andrew Hill
Sam, If this is Windows, ensure you are using a System DSN. If this is *nix, ensure you have an ODBC driver installed and the odbc.ini file pointed to via a putenv(). Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access

Re: [PHP-DB] multiple tables insert

2002-01-11 Thread Barry Rumsey
Thanks for that. But it has brought up another question. I'll list the tables so you'll know what i'm on about. TABLE 1 : Album alb_id int(11) NOT NULL auto_increment, art_id int(11) NOT NULL default '0', alb_name varchar(255) NOT NULL default '', alb_image varchar(255) NOT NULL default

Re: [PHP-DB] Oracle date conversion

2002-01-11 Thread David C. Norris
Thanks for your response. When I use SQL*Plus, I get full date+time. I also get a full datetime from cx_Oracle (a Python module). Is this then a default _PHP_ behavior when querying an Oracle db? Why not return the full info? Ordinarily, I would not complain about the small rewrite you

[PHP-DB] How do I know when to

2002-01-11 Thread Jerry Leonard
Hi, I am really new to MySQL and am wondering this: I understand how to make a database and tables but what I don't understand is when to make a row an int with auto_increment or just a plain int. Or why would you use varchar(50) instead of char(50). Could someone please explain what is

Re: [PHP-DB] How do I know when to

2002-01-11 Thread Raquel Rice
On Fri, 11 Jan 2002 15:02:00 -0800 Jerry Leonard Jerry Leonard [EMAIL PROTECTED] wrote: Hi, I am really new to MySQL and am wondering this: I understand how to make a database and tables but what I don't understand is when to make a row an int with auto_increment or just a plain int.

[PHP-DB] How do I know when to

2002-01-11 Thread Jerry Leonard
Okay this is the way I understand the statement below. The uid will be a number from 1 to 10, max length of ten digits say starting at 1 then as the next user registers it will automatically make that user number 2. Am I correct? CREATE TABLE users ( uid int(10) unsigned NOT NULL

Re: [PHP-DB] How do I know when to

2002-01-11 Thread Raquel Rice
On Fri, 11 Jan 2002 17:21:28 -0800 Jerry Leonard Jerry Leonard [EMAIL PROTECTED] wrote: Okay this is the way I understand the statement below. The uid will be a number from 1 to 10, max length of ten digits say starting at 1 then as the next user registers it will automatically make that

Re: [PHP-DB] multiple tables insert

2002-01-11 Thread Barry Rumsey
I had been looking for a pre made script for a lyric site like phpnuke but the only one I could find was myphplyrics which is quite hopeless ,so I've had no choice but to try and make my own any way I would like to thank you for all your help so far. B.J.Rumsey. - Original Message -

[PHP-DB] 2D array into mySQL DB

2002-01-11 Thread Adam Royle
Hi there... I wrote a PHP script which extracts the title and content from all the HTML files in a directory and puts the filename, title and content into a 2 dimensional array. I know the array is fine because when I print it to the page it dislays properly. When I try to input it into the

[PHP-DB] processing data from mysql queries with php

2002-01-11 Thread Keith Posehn
Quick question for you guru's out there: I have a set of dynamic pages. In the mysql database, I have most of my content stored and retrieve it with queries sent from php. Is there a way to have php send the query, get the data which _includes_ php code in it, and then process the code from the

Re: [PHP-DB] 2D array into mySQL DB

2002-01-11 Thread Jason Wong
On Saturday 12 January 2002 10:42, Adam Royle wrote: Hi there... I wrote a PHP script which extracts the title and content from all the HTML files in a directory and puts the filename, title and content into a 2 dimensional array. I know the array is fine because when I print it to the