[PHP-DB] Re: JOIN question
On Wed, 28 Jul 2004 14:00, Chris Payne wrote: Hi there everyone, I'm transferring a client's product from a Visual Basic .NET ACCESS 2000 application to run on a custom install of Apache/MySQL/PHP which I created (With a custom installer which sets everything up for them). My question though, is on looking through their ACCESS database, there seem to be table joins - or at least that's what I understand they would be under MySQL 4. How can I read information from 3 tables at the same time? I am a little confused, I gather you use JOIN but I'm not sure how it works, could someone please show me an easy to follow example? Thanks, I really appreciate it. Oh and so far, on the pages that I haven't had to use JOINS, I can honestly say that MySQL is FAR faster than ACCESS from what I'm seeing in my development here. Chris Check out http://dev.mysql.com/doc/mysql/en/JOIN.html for the syntax and examples, and also http://www.google.com/search?q=sql+tutorial as a starting point for some SQL tutorials which will cover joins in more detail than you will probably get here. -- David Robley Shh! Be vewy quiet, I'm hunting wuntime errors! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] generating reports in php
hi, Is there any product to create reports in an easy way like Crystal Reports or Access? I want to create a report that can be stored in XML and I want to insert this reports to be web available. Advices?? thanks in advance CArlos -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] generating reports in php
First, describe more details about reports such you need. Second, please, do not start new topics by replying on existing. It breaks strukture of mailing list and makes view of topics complicated. Carlos Merino wrote: hi, Is there any product to create reports in an easy way like Crystal Reports or Access? I want to create a report that can be stored in XML and I want to insert this reports to be web available. Advices?? thanks in advance CArlos -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] generating reports in php
Sorry for my mistake, I need reports based on information stored in a mysql database, I need an easy way to produce tipical reports with header, footer and several detail groups I don´t need graphics, only a functional way to generate the reports storing them in XML...in fact I'm asking if is there any tool with a GUI to generate reports from a mysql in an easy way, perhaps creating an XML and the XSL asociated so its easy to create customizable HTML reports, my problem is that I need to build a lot of different reports and I´m looking for a way to do this in a faster way, I´m not an expert in PHP but in Java there many packages to do this like datavision http://datavision.sourceforge.net/ o jasperreports http://jasperreports.sourceforge.net/ thanks in advance CArlos Mikhail U. Petrov wrote: First, describe more details about reports such you need. Second, please, do not start new topics by replying on existing. It breaks strukture of mailing list and makes view of topics complicated. Carlos Merino wrote: hi, Is there any product to create reports in an easy way like Crystal Reports or Access? I want to create a report that can be stored in XML and I want to insert this reports to be web available. Advices?? thanks in advance CArlos -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] MySQL software question
Is there a piece of software that will allow my to create MySQL databases and table relations in a graphical format without having to connect to the database? I am looking for something where I can point and click the creation of tables and easily create several relationships between tables ( kinda like in access ) and when in done it will create the .sql file? I prefer this to be a desktop application. Thanks
Re: [PHP-DB] MySQL software question
May be ERwin or BPwin can help you. imho ERwin works with MSSQL, Access, so maybe new versions work with MySQL too. Vincent Jordan wrote: Is there a piece of software that will allow my to create MySQL databases and table relations in a graphical format without having to connect to the database? I am looking for something where I can point and click the creation of tables and easily create several relationships between tables ( kinda like in access ) and when in done it will create the .sql file? I prefer this to be a desktop application. Thanks -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] MySQL software question
I have ERwin 4.1.2208 installed, and it connects to MySQL only through ODBC, so one needs to have the MyODBC.dll installed. You can then make an ODBC connection with it. But ERwin is probably a $4,000.00 software package. Pretty steep for an individual... dave May be ERwin or BPwin can help you. imho ERwin works with MSSQL, Access, so maybe new versions work with MySQL too. Vincent Jordan wrote: Is there a piece of software that will allow my to create MySQL databases and table relations in a graphical format without having to connect to the database? I am looking for something where I can point and click the creation of tables and easily create several relationships between tables ( kinda like in access ) and when in done it will create the .sql file?
RE: [PHP-DB] MySQL software question
I've used ERWin recently with MySQL 4.1.x and it works well. It's fairly expensive, but they do have demo versions available. As with any WYSIWYG program you'll probably want to clean up the final product before using it. -Original Message- From: Mikhail U. Petrov [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 28, 2004 7:39 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] MySQL software question May be ERwin or BPwin can help you. imho ERwin works with MSSQL, Access, so maybe new versions work with MySQL too. Vincent Jordan wrote: Is there a piece of software that will allow my to create MySQL databases and table relations in a graphical format without having to connect to the database? I am looking for something where I can point and click the creation of tables and easily create several relationships between tables ( kinda like in access ) and when in done it will create the .sql file? I prefer this to be a desktop application. Thanks -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] RE: Session Values Change
Jacob, Here is my solution. At the top, it checks to see if you are passing a new name via a querystring. If not, it checks to see if a name is present in the session yet. If not, it initializes the session to Jacob. It puts the session's value into the variable $view. If you passed a name, it stores the name in the session and has it in the variable $view. Now, $view will have a name that the SQL statement can use. At the bottom, where you choose a name, it simply passes the name selection back to the page via a querystring field. Try the following (notice the changes at the top and the links around the names at the bottom): ?php session_start(); $view = $_GET['view']; if ($view == '') { if (! isset($_SESSION['view'])) { $_SESSION['view'] = Jacob; } $view = $_SESSION['view']; } else { $_SESSION['view'] = $view; } ? #FORMATTING CODE HERE $dbuser='php' ; $dbpass=''; $dbhost='localhost'; $conn = mysql_connect ( $dbhost , $dbuser , $dbpass ); //mysql_select_db ( web ); $sql = 'Select UNIX_TIMESTAMP(date) AS date,title,article from web.blog where user='.$view.' order by date desc LIMIT 10'; $result = mysql_query($sql); //Execute For Future Use: SELECT DATE_FORMAT(date,'%W, %D %M, %Y %l:%i%p') content FROM blog while ( $dataRow = mysql_fetch_row ( $result ) ) { $date=date(F dS Y h:i:s A, $dataRow[0]); echo 'a name='.$date.'/a'; echo ' div class=date'.$date. '/div'; echo ' h3'.$dataRow[1].'/h3'; echo ' p'.$dataRow[2].'/pbr'; #echo $sql ; } mysql_close ( $conn ); #FORMATTING CODE HERE div id=footer p Other Users: br a href=pagename.php?view=JacobJacob Hackamack/a | a href=pagename.php?view=JulieJulie Hackamack/a | a href=pagename.php?view=DavidDavid Hackamack/a/p /div -Original Message- From: Jacob Hackamack [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 10:21 PM To: [EMAIL PROTECTED] Subject: Session Values Change Hello, I am trying to start a blog page where the person selects their person they want to view (bottom of the page) and then it somehow changes the session variable (top of the code) and then accesses the database. I was wondering, what is the correct way to do something like this. I have tried a couple of options (a hrefs) but they didn¹t seem to work and was wondering if anybody had any suggestions. Thank You In Advance Jacob ?php session_start(); if (! isset($_SESSION['view'])) { $_SESSION['view'] = Jacob; } ? #FORMATTING CODE HERE $dbuser='php' ; $dbpass=''; $dbhost='localhost'; $conn = mysql_connect ( $dbhost , $dbuser , $dbpass ); //mysql_select_db ( web ); $sql = 'Select UNIX_TIMESTAMP(date) AS date,title,article from web.blog where user='.$view.' order by date desc LIMIT 10'; $result = mysql_query($sql); //Execute For Future Use: SELECT DATE_FORMAT(date,'%W, %D %M, %Y %l:%i%p') content FROM blog while ( $dataRow = mysql_fetch_row ( $result ) ) { $date=date(F dS Y h:i:s A, $dataRow[0]); echo 'a name='.$date.'/a'; echo ' div class=date'.$date. '/div'; echo ' h3'.$dataRow[1].'/h3'; echo ' p'.$dataRow[2].'/pbr'; #echo $sql ; } mysql_close ( $conn ); #FORMATTING CODE HERE div id=footer p Other Users: br Jacob Hackamack | Julie Hackamack | David Hackamack/p /div -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: generating reports in php
Hello, On 07/28/2004 05:50 AM, Carlos Merino wrote: hi, Is there any product to create reports in an easy way like Crystal Reports or Access? I want to create a report that can be stored in XML and I want to insert this reports to be web available. Advices?? Try Agata reports: http://www.agata.org.br/ -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] MySQL software question
Vincent Jordan wrote: Is there a piece of software that will allow my to create MySQL databases and table relations in a graphical format without having to connect to the database? snip Try DB Designer from Fabforce - it has it's idiosyncracies, but it is free, and I use it without major problems. HTH -- Rory McKinley Nebula Solutions +27 21 555 3227 - office +27 21 551 0676 - fax +27 82 857 2391 - mobile www.nebula.co.za This e-mail is intended only for the person to whom it is addressed and may contain confidential information which may be legally privileged. Nebula Solutions accepts no liability for any loss, expense or damage arising from this e-mail and/or any attachments. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] php mysql dates
Hi all, currently I have a form which prompts for the user to choose a date. The dropdown lists are stored into variables: $month//e.g. January, February, ... $day //e.g 1 - 31 $year //e.g. 2004 (four digits) then combined into $articleDate How can I manipulate this variable to be in such a format that I can insert the information into a DATE column in a mySQL database. Dates are a bit of a mystery to me as PHP and MySQL handle them differently. Your help is appreciated. Thanks
RE: [PHP-DB] php mysql dates
Sure I understand Y-m-d. But won't the database cry because the Month is in text format? (January, february)? Thanks again. Subject: Re: [PHP-DB] php mysql dates On Wed, 28 Jul 2004 14:30:24 -0700, Irm Jr [EMAIL PROTECTED] wrote: Hi all, currently I have a form which prompts for the user to choose a date. The dropdown lists are stored into variables: $month//e.g. January, February, ... $day //e.g 1 - 31 $year //e.g. 2004 (four digits) then combined into $articleDate How can I manipulate this variable to be in such a format that I can insert the information into a DATE column in a mySQL database. Dates are a bit of a mystery to me as PHP and MySQL handle them differently. Your help is appreciated. Y-m-d -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] php mysql dates
On Wed, 28 Jul 2004 14:39:01 -0700, Irm Jr [EMAIL PROTECTED] wrote: Sure I understand Y-m-d. But won't the database cry because the Month is in text format? (January, february)? Thanks again. Whoops, I should read *all* the text of the question... Easiest way to deal with that, IMHO, is strtotime and date. $mysqlDate = date('Y-m-d', strtotime($month.' '.$day.', '.$year)); If you're using dates far in the past or future, though, this won't work. Better to use a date handling class, such as: http://pear.php.net/package/Date Subject: Re: [PHP-DB] php mysql dates On Wed, 28 Jul 2004 14:30:24 -0700, Irm Jr [EMAIL PROTECTED] wrote: Hi all, currently I have a form which prompts for the user to choose a date. The dropdown lists are stored into variables: $month//e.g. January, February, ... $day //e.g 1 - 31 $year //e.g. 2004 (four digits) then combined into $articleDate How can I manipulate this variable to be in such a format that I can insert the information into a DATE column in a mySQL database. Dates are a bit of a mystery to me as PHP and MySQL handle them differently. Your help is appreciated. Y-m-d -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] php mysql dates
I would suggest creating the select dropdown so that the value is actually the numeric value of the month. i.e: select name=month id=month size=1 option value=01January/option option value=02February/option . . . /select Then you can do a simple concat before adding to the database. --Nicole --- Nicole Swan Web Programming Specialist Carroll College CCIT (406)447-4310 -Original Message- From: Justin Patrin [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 28, 2004 3:44 PM To: Irm Jr Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] php mysql dates On Wed, 28 Jul 2004 14:39:01 -0700, Irm Jr [EMAIL PROTECTED] wrote: Sure I understand Y-m-d. But won't the database cry because the Month is in text format? (January, february)? Thanks again. Whoops, I should read *all* the text of the question... Easiest way to deal with that, IMHO, is strtotime and date. $mysqlDate = date('Y-m-d', strtotime($month.' '.$day.', '.$year)); If you're using dates far in the past or future, though, this won't work. Better to use a date handling class, such as: http://pear.php.net/package/Date Subject: Re: [PHP-DB] php mysql dates On Wed, 28 Jul 2004 14:30:24 -0700, Irm Jr [EMAIL PROTECTED] wrote: Hi all, currently I have a form which prompts for the user to choose a date. The dropdown lists are stored into variables: $month//e.g. January, February, ... $day //e.g 1 - 31 $year //e.g. 2004 (four digits) then combined into $articleDate How can I manipulate this variable to be in such a format that I can insert the information into a DATE column in a mySQL database. Dates are a bit of a mystery to me as PHP and MySQL handle them differently. Your help is appreciated. Y-m-d -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] php mysql dates
Thanks for the replies. I believe I have two solutions now! Take care. Much apprecitated. -Original Message- From: Swan, Nicole [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 28, 2004 2:48 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] php mysql dates I would suggest creating the select dropdown so that the value is actually the numeric value of the month. i.e: select name=month id=month size=1 option value=01January/option option value=02February/option . . . /select Then you can do a simple concat before adding to the database. --Nicole --- Nicole Swan Web Programming Specialist Carroll College CCIT (406)447-4310 -Original Message- From: Justin Patrin [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 28, 2004 3:44 PM To: Irm Jr Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] php mysql dates On Wed, 28 Jul 2004 14:39:01 -0700, Irm Jr [EMAIL PROTECTED] wrote: Sure I understand Y-m-d. But won't the database cry because the Month is in text format? (January, february)? Thanks again. Whoops, I should read *all* the text of the question... Easiest way to deal with that, IMHO, is strtotime and date. $mysqlDate = date('Y-m-d', strtotime($month.' '.$day.', '.$year)); If you're using dates far in the past or future, though, this won't work. Better to use a date handling class, such as: http://pear.php.net/package/Date Subject: Re: [PHP-DB] php mysql dates On Wed, 28 Jul 2004 14:30:24 -0700, Irm Jr [EMAIL PROTECTED] wrote: Hi all, currently I have a form which prompts for the user to choose a date. The dropdown lists are stored into variables: $month//e.g. January, February, ... $day //e.g 1 - 31 $year //e.g. 2004 (four digits) then combined into $articleDate How can I manipulate this variable to be in such a format that I can insert the information into a DATE column in a mySQL database. Dates are a bit of a mystery to me as PHP and MySQL handle them differently. Your help is appreciated. Y-m-d -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] php mysql dates
Dear Irm Jr, Here are two functions:: http::/www.php.net/strtotime http::/www.php.net/mktime using these functions togethor you can do the need full. BTW why not store just unix time stamp in mysql database. Most People use a string field in mysql database to store timestamp, it simply work without any problem. zareef ahmed --- Irm Jr [EMAIL PROTECTED] wrote: Hi all, currently I have a form which prompts for the user to choose a date. The dropdown lists are stored into variables: $month//e.g. January, February, ... $day //e.g 1 - 31 $year //e.g. 2004 (four digits) then combined into $articleDate How can I manipulate this variable to be in such a format that I can insert the information into a DATE column in a mySQL database. Dates are a bit of a mystery to me as PHP and MySQL handle them differently. Your help is appreciated. Thanks = Zareef Ahmed :: A PHP Developer in Delhi(India). Homepage :: http://www.zasaifi.com __ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php