RE: [PHP-DB] Transfering post data to a series of pages.
After looking at what I wanted to do I see no good reason I can't do most of what we needed with function calls. The others can be handled with plugging more data into my session array. Somehow I thought this was a poor way of coding (I don't know why). Thank you everyone for your advice! - Matthew -Original Message- From: Brad Webb [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 04, 2005 12:21 PM To: php-db@lists.php.net Subject: Re: [PHP-DB] Transfering post data to a series of pages. You may also consider using sessions to store form data.. this allows for actual user interaction with the data, back/forward etc... as well as tracking and other stuff.. you really should only have "Page1.php", and use a logic object to parse the data from there.. IMHO, of course. :) [EMAIL PROTECTED] wrote: >Perry, Matthew (Fire Marshal's Office) wrote: > > >>Is there a way to transfer post data to a series of PHP pages? >> >>For example, lets say I have the following 4 pages: >>Page1.php - this page has my original post form >>Page2.php - this page does one thing with the post data >>Page3.php - this page does another thing with the post data >>Page4.php - this page shows the results of everything I have done >> >>Right now I am using the header: >> >>The problem is, the following works: >>Page1.php - this page has my original post form >>Page2.php - this page does one thing with the post data >>Page3.php - this page shows the results of everything I have done >> >>But when I try to add the second transfer the data is lost: >>Page1.php - this page has my original post form >>Page2.php - this page does one thing with the post data >>Page3.php - this page does another thing with the post data >>Page4.php - Only the results from Page2.php are shown >> >>ASP does this with <%Server.Transfer ("transferpage1.asp")%> >>Is there a counterpart with PHP? >> >>- Matthew >> >> > >Martin Norland wrote: > > >>>include() :P >>> >>> > > > >>>seriously though, Page1.php and Page4.php are the only two pages that >>>should exist, if any. Page2 and Page3 should pretty much guaranteed be >>> >>> > > > >>>turned into function calls or classes and called from Page4.php. You >>>don't need to separate logic and display in separate scripts that you >>>push everything at, just separate your logic out into function calls. >>> >>> > > >What Martin suggests makes a lot of sense. Can you say something about why >you have the site design the way that you do? > >David > > -- 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] Transfering post data to a series of pages
Is there a way to transfer post data to a series of PHP pages? For example, lets say I have the following 4 pages: Page1.php - this page has my original post form Page2.php - this page does one thing with the post data Page3.php - this page does another thing with the post data Page4.php - this page shows the results of everything I have done Right now I am using the header: The problem is, the following works: Page1.php - this page has my original post form Page2.php - this page does one thing with the post data Page3.php - this page shows the results of everything I have done But when I try to add the second transfer the data is lost: Page1.php - this page has my original post form Page2.php - this page does one thing with the post data Page3.php - this page does another thing with the post data Page4.php - Only the results from Page2.php are shown ASP does this with <%Server.Transfer ("transferpage1.asp")%> Is there a counterpart with PHP? - Matthew -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Exporting pictures to Excel
I am having some difficulties exporting images to excel. I am using the following header: Then I just create a table with my data. This works beautifully and generates the file correctly with one exception. When I include the following HTML in one of the columns: It only saves the PATH to the image and not the image itself. When I am inside the correct directory the image displays. As soon as I move it outside this directory it does not display. This makes sense because that is how HTML works. But what I want to do is have PHP export the image to excel and insert this image into the file I am attempting to generate. Is there a means to insert the actual image into the generated file instead of the path? Thank you for your time, Matthew Perry
RE: [PHP-DB] grabbing data from other peoples sites
I guess my real question is how to parse the output from someone else's site. Setting up the lookup procedure from data in my database and filling their form with the address is the easy part. How do I make their form "submit", parse the output, store it, and then reuse it in another function? I have never tried something like this before. - Matthew -Original Message- From: Martin Norland [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 16, 2005 10:09 AM To: php-db@lists.php.net Subject: Re: [PHP-DB] grabbing data from other peoples sites Perry, Matthew (Fire Marshal's Office) wrote: [snip] > What this has to do with PHP > > Is there a way to write some sort of PHP script that accesses to the county > auditors website, automatically enters the info into their form, grabs > whatever information is outputted, imports the data into our SQL Server, and > repeats the process for all addresses in our database? > > I will of course research the legality of this before we implement the > script. I just wanted to know if this was even feasible before we meet > about this. I don't even know where we should start. Sure, you're just issuing POST requests with data from your database, and parsing the output - and entering that extracted data back into your database again. A better question, however, would be how are you planning to handle this once you are ready to run it - are you just storing the address at each corner of your 'covered regions'? You'll need some kind of fuzzy lookup to be able to do all this. Maybe a better solution would be to just link directly to the county auditors website with instructions, allowing the users to do their queries as they're needed? Even if you have every current covered address on file, people may mistype things - new buildings are created - roads are renamed, etc. Someone should contact maps.google.com and see about adding this sort of information to that :) Cheers, -- - Martin Norland, Sys Admin / Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. -- 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] grabbing data from other peoples sites
I have searched the archives as it this question has almost assuredly been asked countless times. Unfortunately I have no idea what sort of keyword or parameter is applicable for this topic. History Here is a brief history of the problem we are trying to solve. Feel free to skip this section if you only want to see what this has to do with PHP. We need to correlate residents of our county to their local fire departments. We receive about 10 calls a day asking this very question and someone in our office has to literally pick up a map and see find where the little lines for the fire department end. The process takes about 10 minutes where it should only take seconds. We want citizens of Harris County to enter this information into our web forms instead of calling us. Our county tax auditors have already done this through a project that costed millions of taxpayers dollars. The information is protected and available under the Open Records Act of 2000. Unfortunately the Open Records Act does NOT require any government agency to provide their information in electronic form or some sort of database dump. We have requested ALL data about EVERYTHING they have concerning ANY fire department at ANY location (which is our right and privilege). The handed us a huge stack of paper (not something we can import) with a big invoice (both of which we happily declined). The county auditor's website uses ASP and MS SQL Server to allow people to enter their address and find out this information. Unfortunately the information only makes sense to people who understand the coding scheme! What this has to do with PHP Is there a way to write some sort of PHP script that accesses to the county auditors website, automatically enters the info into their form, grabs whatever information is outputted, imports the data into our SQL Server, and repeats the process for all addresses in our database? I will of course research the legality of this before we implement the script. I just wanted to know if this was even feasible before we meet about this. I don't even know where we should start. - Matthew
[PHP-DB] GD with IIS and MS SQL Server
I work with a county office in Houston, Texas and have been forced to use Windows IIS (on Windows 2000 Server) with MS SQL Server. They have permitted me to use PHP (instead of ASP) when I showed them problems on every county ASP site. Most applications on IIS are running well including database connections and all my PHP functions but I am having problems getting GD applets to work. The GD application that I am most interested in outputs a bar code image. On the Windows Server this image does not appear and there are no error messages outputted even when the display error messages option is enabled (at least this is what our IT department claims!) This application works perfectly on my local Apache Server (which runs on my Windows XP machine). Has anyone attempted to get PHP / MS SQL Server / Windows IIS to work? If so, have you had similar difficulties when you tried to enable GD? - Matthew
RE: [PHP-DB] Excel headers not working anymore
Wow! Removing the file that controlled the session array fixed the problem (suggestion 2). I was using ssl and session data and would never have guessed it would trip things up. I would have stared at this problem for weeks and probably not have solved the problem. Also I will change my code to include mailto:[EMAIL PROTECTED] Sent: Friday, February 11, 2005 10:47 AM To: php-db@lists.php.net Subject: Re: [PHP-DB] Excel headers not working anymore Perry, Matthew (Fire Marshal's Office) wrote: > Good morning, > > I have been using PHP4.1, Apache, and MySQL for a few years now and have > never had a problem with my Excel headers. When I want to output html to > Excel I place the following on the top of the page: > > header ("Content-Disposition: attachment" ); > > After moving to PHP 4.3, MS SQL Server, Windows 2000 Server I am having > problems with this header. I get the message: > "Internet Explorer cannot download myfile.php from myintranet.net" 1) is your server still configured to recognize "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] Excel headers not working anymore
Good morning, I have been using PHP4.1, Apache, and MySQL for a few years now and have never had a problem with my Excel headers. When I want to output html to Excel I place the following on the top of the page: http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] javascript and php
Hello all, I am having difficulties working with a JavaScript menu that should load on each page of my intranet site. Here is a brief background of the problem: 1) I am using PHP and SQL Server and it is running on Windows 2000 Server (yes I know this stinks but I have no choice in my office). 2) My users first log in. Login information is saved in the PHP session array. This information dynamically adjusts what the users will see from that point on. The higher the access level the more "stuff" they can see. This should be pretty common. 3) All of my PHP functions display information correctly based on the data stored in the session array. For example, if the user has an administrative login, SSN and rate of pay are displayed while this data is not displayed for other employees. 4) I am using a JavaScript application for my navigation menu. I chose this because I need collapsing menus. There are lots of functions under each category; if I were to use HTML for the menu, my users would have to scroll way down to get to where they want to go - especially the ones still using 800X600 monitor resolution. A php function calls the JavaScript menu and changes what is displayed based on the session array data. Here is the problem: My JavaScript menu DOES NOT always display. It displays about 95% of the time. When it displays, it displays correctly (based on the session data). When it doesn't display, I hit reload and it usually reappears. What's worse, it seems to happen randomly! I could click the same link 10 times and it will work perfectly. The 11th time it might not show up. Here is the small amount of information I know about the problem: I have read through the list server achieves and think the problem may lie with the fact that Javascript has to run at the Web Browser end and PHP has to run at Server Side. This probably explains how it is possible that the two are not in sync but it does not explain WHY this happens about 5% of the time. It also does not explain why it happens only to the JavaScript while always displaying the results of my php functions. Here are my questions: 1) How can make this menu display 100% of the time? I realize this may be hard to answer without looking at all of my code. 2) Should I stop using JavaScript? If so, what should I use instead that allows collapsing menus? Thank you for your time, - Matthew Perry
RE: [PHP-DB] IIS, PHP, and session data
It turns out that the real problem was problem 1) I am not personally in control of our web server. I forwarded some of the posted messages to our IT department and they decided to change what they were telling me. They actually had register globals turned off not on. I changed my code to use the session array and it works beautifully now. Thank you all for your advice! - Matthew -Original Message- From: Simon Rees [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 25, 2005 4:25 PM To: php-db@lists.php.net Cc: Perry, Matthew (Fire Marshal's Office) Subject: Re: [PHP-DB] IIS, PHP, and session data On Tuesday 25 January 2005 20:20, Perry, Matthew (Fire Marshal's Office) wrote: > I am having trouble with my session data on Microsoft IIS. > > Here is a little background of the problem: > > 1) I am not personally in control of our web server. Our IT > department manages it. oh dear! ;-) > They have IIS running on their sever and use MS > SQL Server, but they have allowed me to use PHP instead of ASP. > > 2) I have Apache running on a local web server in our office (not > the IT department). It accesses the SQL Server database remotely. I I can't comment on the use of register_globals or session_register as I always use the $_SESSION array but I do use PHP on IIS... Something that you might like to check is that the directory specified by: session.save_path in the IIS server's php.ini is a directory writable by the user that IIS masquerades. The default value for this is: c:\php\sessiondata which if your sysadmin installed php as Administrator will not be writable by the IIS user (normally IUSR_). Either get the sysadmin to specify (& create) another dir that is writable by IIS or change the permissions on c:\php\sessiondata Assuming you're running Apache on a Linux (and probably other un*x) distribution you will find that the session.save_path variable is set to /tmp which is usually world writable. I think if you posted the exact error message it would tell me if this was happening to you or not... hth, Simon -- ~~ Simon Rees | [EMAIL PROTECTED] | ORA-03113: end-of-file on communication channel ~~ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] IIS, PHP, and session data
I am having trouble with my session data on Microsoft IIS. Here is a little background of the problem: 1) I am not personally in control of our web server. Our IT department manages it. They have IIS running on their sever and use MS SQL Server, but they have allowed me to use PHP instead of ASP. 2) I have Apache running on a local web server in our office (not the IT department). It accesses the SQL Server database remotely. I have register_global turned OFF and use the following code on each page: session_start(); session_register('logged_in'); session_register('username'); etc... Everything works PERFECTLY on my local system. 3) I have ported all of my code to the IIS server location. It accesses the database correctly but displays an error message when I try to use the session data. It does NOT post messages that the session could not be started (which is the normal sign of session data not being allowed). The message says the variable does not exist. It is as if the session is started but the variables aren't being saved. The question I have is: What concerns should I have with PHP sessions when I move from Apache to IIS? I do NOT need to know how to set up IIS to allow session data correctly (that's the job of our IT department). If this sounds like something our IT department has set up wrong, please do not feel compelled to answer this question. I just would appreciate some advice on what I may need to change in my own code so that it works with IIS instead of Apache. Thank you for your time, Matthew Perry
[PHP-DB] & terminates string?
I am using PHP 4.3.1 and running Apache Server and MySQL. The following question is probably only related to PHP. Here is the problem: I am passing the following string from one form to another: "../create.php?dest=Employee/menu_handleemployee.php?action=update&ID=$ID" Here is the actual code: When I view the source it comes out as expected: But after it goes to the next page it turns into this: "../create.php?dest=Employee/menu_handleemployee.php?action=update" Everything up to and after the '&' disappears!! The goal of this code is to send the redirect address to the form that modifies my data. I want variable "dest" to be used to dynamically redirect the page. I have tried the following to fix the problem without avail: 1) I tried saving the variable in other ways such as text fields in the form itself. 2) I tried addslashes() (which works well with similar problems related to ', " etc.). 3) I tried adding \ before & 4) I danced around my computer and threatened to pull the plug. None of these worked! What is it about '&' that throws everything off with PHP variables? It doesn't seem to be a problem with HTML. This is exceedingly difficult to research online because '&' is excluded from most search engines automatically. -Matthew
RE: [PHP-DB] NULL VALUE
I apologize for my lack of information concerning this problem and I appreciate the "advice for beginners". I also did not mean to post it on this list (If you notice my original message also contained a thank you for a question never asked in this list). I am terribly sorry about this error. HOWEVER: The question can regardless be addressed in this list since it is not appear to be version or database specific. I am using MySQL 4.1 but have experienced the same problem with MS SQL Server. The issue here is NOT whether STATUS is a keyword. Yes STATUS is a keyword and indeed it would probably be wise if I did not use keywords as column names. The reason I chose to leave this column named "STATUS" is that it is linked to other databases (ouch!) and such attempts have proven to cause even more problems. But in theory this does not matter. One can use keywords as column names in all recent versions of MySQL even though this is unadvised (you have to search the MySQL site for longer than 5 seconds to learn this). The problem exists for all column names. I have experimented with other test tables with more standard column names and have had the same result. mysql_error() or mysqli_error() also do not help here. Even if you enter the SQL command directly it posts a result that changes 0 rows and the query completes without any errors. I believe this problem lies in how SQL handles NULL values. Let me change the column name to avoid the question concerning STATUS as a keyword. UPDATE EMPLOYEE SET STATUS_lsdkrjg='Inactive' where STATUS != 'Active'; UPDATE EMPLOYEE SET STATUS_lsdkrjg ='Inactive' where STATUS <> 'Active'; UPDATE EMPLOYEE SET STATUS_lsdkrjg ='Inactive' where STATUS IS NULL'; UPDATE EMPLOYEE SET STATUS_lsdkrjg ='Inactive' where STATUS = ''; UPDATE EMPLOYEE SET STATUS_lsdkrjg ='Inactive' where STATUS = NULL; None of these work to update table "Employee". According to some of my SQL reference manuals they should! I have tried the following and had success with one of these options: create table TEST ( testA varchar(30), testB varchar(30) ); insert into TEST values ('a', 'a'); insert into TEST values (NULL, 'a'); +++ | testA | testB | +++ | a | a | | [NULL] | a | +++ UPDATE TEST set testA='b' where testA=''; UPDATE TEST set testA='b' where testA<>'a'; +++ | testA | testB | +++ | a | a | | [NULL] | a | +++ Finally I tried this: UPDATE TEST set testA='b' where testA IS NULL; +++ | testA | testB | +++ | a | a | | b | a | +++ But the last example does not work for ANY fields in my EMPLOYEES table. I thought at first the problem might have arisen with the fact that this table is linked to other databases, but even after I removed the links this problem exists! I think the problem still lies with my understanding of NULL. What am I forgetting about the nature of NULL values? Why won't the following work for NULL values? UPDATE TEST set testA='b' where testA=''; UPDATE TEST set testA='b' where testA<>'a'; How is it possible that all NULL values equal any string? If this question does not belong in this list I will make no additional postings concerning this topic and will continue researching other sources. Once again I apologize for the original posting. It was meant to go to one of my associates (who also does not know the answer!). - Matthew -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 2:16 PM To: php-db@lists.php.net Subject: Re: [PHP-DB] NULL VALUE Norland, Martin wrote: >>-Original Message- >>From: Jochem Maas [mailto:[EMAIL PROTECTED] >>Sent: Monday, January 03, 2005 12:16 PM >>Subject: Re: [PHP-DB] NULL VALUE >> >>LightBulbMoment (tm): 5 seconds of searching on the MYSQL site tells > > me > >>STATUS is a keyword. try either renaming your field or using backticks > > >>to escape the name e.g.: > > > http://dev.mysql.com/doc/mysql/en/Reserved_words.html doesn't list > status, although I am familiar with its various forms e.g. "show > status". I didn't even go as far looking there I made the assumption that mysql was crapping out on 'STATUS' because of its use in 'SHOW STATUS' query (and the like) - also its hard to determine whats going wrong with someones setup when you have no idea what version of stuff they are running - bare in mind we assume the chap (Matthew Perry) in question is using MySQL but he did not state this so that may be incorrect. at any rate dumping the output of mysql_error() or mysqli_error() would probably have saved him an email to this list. ;-) > > You're probably right, but I don't exactly see this as a 'clearly > documented'. Still, backticking all field names is a good idea anyway. I didn't mean to say it was clearly documented (IMHO reading & understanding
[PHP-DB] NULL VALUE
My "status" column in my Employee table should have two values "Active" and "Inactive". Right now all the active employees have the value "Active" and the rest have a NULL value. Why is it that the following commands do nothing? UPDATE EMPLOYEE SET STATUS='Inactive' where STATUS != 'Active'; UPDATE EMPLOYEE SET STATUS='Inactive' where STATUS <> 'Active'; UPDATE EMPLOYEE SET STATUS='Inactive' where STATUS IS NULL'; UPDATE EMPLOYEE SET STATUS='Inactive' where STATUS = ''; UPDATE EMPLOYEE SET STATUS='Inactive' where STATUS = NULL; - Matthew
[PHP-DB] get primary key
This one should be easy for most of you. What is the SQL query to select the column name for the primary key of a table? -Matthew
[PHP-DB] to many addresses
We have about 20,000 addresses in our database. If my users are filling out a form that requires an address already in our database I have to make sure they enter it in a format already in the db (such as "West Road" not "West Rd."). I have to also allow for new addresses. Obviously having a dropdown of 20,000 entries and a second field called "Other Address Not Here" will not work. It would also be nice if the field auto fills with suggested addresses from the database. Does anyone have advice on how I should do this? I have been scratching my head over this problem all morning. -Matthew
RE: [PHP-DB] mysql to access
Here is the problem: I am currently using MySQL and PHP for this application but have realized recently that the bulk of my work is setting up three forms (add, view, modify) for each table I create. It takes hours for each table with MySQL and PHP but takes only minutes with Access. Also, other office administrators have been trained in Access instead of MySQL and will not be able to update my tables directly or set up new forms if I only use MySQL and PHP. On the other hand, PHP and ASP are easier and more flexible with user control options. Also, directly entering SQL can be much more efficient than using Access's embedded SQL applications. I really would like to exploit the advantages of both databases but do not know the best means by which to do this. We are creating a standard that will be followed by everyone in our department and need the best and most efficient solution possible. People move around from different positions constantly and it seems we are making radical changes to our system every year. Here are three questions with which I still need help: 1) Would it really make sense to split the data management between two linked databases (Access and MySQL) or would this just cause problems? 2) If I must use Access, should I use ASP(grrr) instead of PHP? 3) If I must use Access, should I use MS SQL Server(grrr) instead of MySQL? Thank you all for your time and patience. - Matthew -Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Friday, December 17, 2004 10:01 AM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] mysql to access it would depend on what you need the app to do...if you are looking to use access to do reporting and/ or act as a front end, then it may be feasible... more details, if you care to share them, may help in this consideration bastien >From: "Perry, Matthew (Fire Marshal's Office)" <[EMAIL PROTECTED]> >To: "Bastien Koert" <[EMAIL PROTECTED]> >Subject: RE: [PHP-DB] mysql to access >Date: Fri, 17 Dec 2004 09:59:25 -0600 > >You mean link the tables? I haven't yet considered this. >- Matthew > >-Original Message- >From: Bastien Koert [mailto:[EMAIL PROTECTED] >Sent: Friday, December 17, 2004 9:42 AM >To: [EMAIL PROTECTED]; [EMAIL PROTECTED] >Subject: RE: [PHP-DB] mysql to access > >why not just link the mysql to access? > >bastien > > >From: "Perry, Matthew (Fire Marshal's Office)" ><[EMAIL PROTECTED]> > >To: [EMAIL PROTECTED] > >Subject: [PHP-DB] mysql to access > >Date: Fri, 17 Dec 2004 09:33:39 -0600 > > > >Does anyone know of a FREE program that exports MySQL to access? The >trial > >versions of the ones I have downloaded do not export all the records of >the > >database. > > > >- Matthew > > > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] mysql to access
Does anyone know of a FREE program that exports MySQL to access? The trial versions of the ones I have downloaded do not export all the records of the database. - Matthew
[PHP-DB] Excel - merging cells with PHP
When you export a table to excel, is there a way to merge cells and create borders? I want my excel file to look exactly like my html table looks. Matthew Perry
[PHP-DB] PHP vs ASP
I need some ammo to convince my boss not to use ASP but use PHP instead. Anyone have some info I can give him? - Matthew
[PHP-DB] passing both an anchor and a variable
How do you append both an anchor and a variable to a URL with PHP? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] MySQL data harvester
My office purchased 21 fascinating cell phones that have GPS locaters and bar codes. When we scan a bar code with one of these cell phones, the data is sent to a third party company; information about this scan is stored on their database. I have installed a "harvester" on my pc that downloads this data off of the third party database into my own MySQL database. I want to link this data with my other tables to modify my inventory information. What is the best way to continuously update all tables when new transactions occur? With MS SQL Server or ORACLE I would write a stored procedure or trigger that could do this. What tools can I use with MySQL instead of procedures or triggers? Matthew
[PHP-DB] MySQL backup software
Does anyone know a free MySQL backup program to schedule regular backups?
RE: [PHP-DB] backing up database with mysqldump
How do I provide a password? I have been trying -p password[mypass] mysqldump sampledb > ./backup/file.txt -Matt _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, October 25, 2004 11:24 AM To: Perry, Matthew (Fire Marshal's Office) Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] backing up database with mysqldump MySQLdump is an executable program. >From the command line: C:\>mysqldump databasename > ./path/to/backup/file.sql (or file.txt ) C:\>mysqldump --help gives all the options dave "Perry, Matthew (Fire Marshal's Office)" <[EMAIL PROTECTED]> 10/25/2004 11:14 AM To: [EMAIL PROTECTED] cc: Subject: [PHP-DB] backing up database with mysqldump I have attempted to follow the documentation for mysqldump both on mysql.com and previous emails to this list server. Unfortunately none of the advice has helped me successfully backup my database. I have been spoiled by phpmyadmin backup procedures and have never had to manually set up a backup system for a local server. >From shell> what should I enter tot to backup my database called "sampdb" to a location "c:/backups"? Everything I have tried spits out an error message. -Matt
[PHP-DB] backing up database with mysqldump
I have attempted to follow the documentation for mysqldump both on mysql.com and previous emails to this list server. Unfortunately none of the advice has helped me successfully backup my database. I have been spoiled by phpmyadmin backup procedures and have never had to manually set up a backup system for a local server. >From shell> what should I enter tot to backup my database called "sampdb" to a location "c:/backups"? Everything I have tried spits out an error message. -Matt
[PHP-DB] imagecreatefromjpeg()
I am using PHP 4.1 Why would the php function imagecreatefromjpeg() not be recognized? Fatal error: Call to undefined function: imagecreatefromjpeg() in C:\Program Files\Apache Group\Apache2\htdocs\Inventory\updateitem.php on line 77 -Matthew Perry
RE: [PHP-DB] setting root password
How embarrassing. Yes I must have accidentally deleted the table. I reinstalled and it works fine now. Thank you very much for your help. -Matt _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 11:14 AM To: Perry, Matthew (Fire Marshal's Office) Subject: RE: [PHP-DB] setting root password try mysql\> use mysql then mysql\>show tables is the user table there? if not, have you dropped the user table? David "Perry, Matthew (Fire Marshal's Office)" <[EMAIL PROTECTED]> 10/19/2004 11:09 AM To: [EMAIL PROTECTED] cc: Subject: RE: [PHP-DB] setting root password I entered select user(); It outputs: --- user() [EMAIL PROTECTED] --- After I enter: SET PASSWORD FOR [EMAIL PROTECTED]('mypassword'); ERROR 1146: Table mysql.user does not exist. How is this possible? - Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 8:37 AM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] setting root password Matt, Is there a space between PASSWORD and the opening parenthesis? There shouldn't be, if there is. Otherwise, your statement worked without errors for me on MySQL Version 4.0.16.max-nt. Make sure that you are logged in as root. C : \ >select user(); Sometimes MySQL is cryptic about its error messages for security reasons. dave "Perry, Matthew (Fire Marshal's Office)" <[EMAIL PROTECTED]> 10/19/2004 08:24 AM To: [EMAIL PROTECTED] cc: Subject: RE: [PHP-DB] setting root password After going to the command prompt I have done exactly this: c:\>cd C:\mysql\bin c:\mysql\bin>mysql -uroot -p mysql>SET PASSWORD FOR [EMAIL PROTECTED]('mypassword'); I get the following familiar message: You have an error on your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'PASSWORD('mypassword')' at line 1 Why does this not set my password correctly? -Matt _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, October 18, 2004 1:35 PM To: [EMAIL PROTECTED]; Perry, Matthew (Fire Marshal's Office) Subject: Re: [PHP-DB] setting root password If you haven't yet deleted the localhost root account, you can log onto the mysql client with: mysql> mysql -uroot -p then press enter again when it prompts you for a password. You should now be able to manage all your account info. dave "Perry, Matthew (Fire Marshal's Office)" <[EMAIL PROTECTED]> 10/18/2004 01:28 PM To: [EMAIL PROTECTED] cc: Subject: [PHP-DB] setting root password I have tried the step-by-step methods listed on mysql.com for setting a root password for my local server but I keep getting the message "you must have privileges to update tables in the mysql database to be able to change passwords for others". What could I be doing incorrectly? -Matt -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] setting root password
I entered select user(); It outputs: --- user() [EMAIL PROTECTED] --- After I enter: SET PASSWORD FOR [EMAIL PROTECTED]('mypassword'); ERROR 1146: Table mysql.user does not exist. How is this possible? - Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 8:37 AM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] setting root password Matt, Is there a space between PASSWORD and the opening parenthesis? There shouldn't be, if there is. Otherwise, your statement worked without errors for me on MySQL Version 4.0.16.max-nt. Make sure that you are logged in as root. C : \ >select user(); Sometimes MySQL is cryptic about its error messages for security reasons. dave "Perry, Matthew (Fire Marshal's Office)" <[EMAIL PROTECTED]> 10/19/2004 08:24 AM To: [EMAIL PROTECTED] cc: Subject: RE: [PHP-DB] setting root password After going to the command prompt I have done exactly this: c:\>cd C:\mysql\bin c:\mysql\bin>mysql -uroot -p mysql>SET PASSWORD FOR [EMAIL PROTECTED]('mypassword'); I get the following familiar message: You have an error on your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'PASSWORD('mypassword')' at line 1 Why does this not set my password correctly? -Matt _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, October 18, 2004 1:35 PM To: [EMAIL PROTECTED]; Perry, Matthew (Fire Marshal's Office) Subject: Re: [PHP-DB] setting root password If you haven't yet deleted the localhost root account, you can log onto the mysql client with: mysql> mysql -uroot -p then press enter again when it prompts you for a password. You should now be able to manage all your account info. dave "Perry, Matthew (Fire Marshal's Office)" <[EMAIL PROTECTED]> 10/18/2004 01:28 PM To: [EMAIL PROTECTED] cc: Subject: [PHP-DB] setting root password I have tried the step-by-step methods listed on mysql.com for setting a root password for my local server but I keep getting the message "you must have privileges to update tables in the mysql database to be able to change passwords for others". What could I be doing incorrectly? -Matt -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] setting root password
After going to the command prompt I have done exactly this: c:\>cd C:\mysql\bin c:\mysql\bin>mysql -uroot -p mysql>SET PASSWORD FOR [EMAIL PROTECTED]('mypassword'); I get the following familiar message: You have an error on your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'PASSWORD('mypassword')' at line 1 Why does this not set my password correctly? -Matt _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, October 18, 2004 1:35 PM To: [EMAIL PROTECTED]; Perry, Matthew (Fire Marshal's Office) Subject: Re: [PHP-DB] setting root password If you haven't yet deleted the localhost root account, you can log onto the mysql client with: mysql> mysql -uroot -p then press enter again when it prompts you for a password. You should now be able to manage all your account info. dave "Perry, Matthew (Fire Marshal's Office)" <[EMAIL PROTECTED]> 10/18/2004 01:28 PM To: [EMAIL PROTECTED] cc: Subject: [PHP-DB] setting root password I have tried the step-by-step methods listed on mysql.com for setting a root password for my local server but I keep getting the message "you must have privileges to update tables in the mysql database to be able to change passwords for others". What could I be doing incorrectly? -Matt
[PHP-DB] how many databases should I create
I am developing a variety of different web based systems including inventory, payroll, incident reports etc. Should I create a new database for each project category or one huge database with every table I will ever use in it? -Matt
[PHP-DB] setting root password
I have tried the step-by-step methods listed on mysql.com for setting a root password for my local server but I keep getting the message "you must have privileges to update tables in the mysql database to be able to change passwords for others". What could I be doing incorrectly? -Matt
[PHP-DB] moving from MS Access
I have finally convinced my office manager to move from Access to MySQL. Unfortunately the office users are used to Access forms instead of web forms. I have attempted to make my web forms look as much like the Access forms they are used to but I am not a web designer. Does anyone know a good application that can help me with this so I can get away from UI development back to my DB management? I realize this is not a web design list server. Matthew Perry -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php