Re: [PHP] Re: MySQL and PHP weirdness - RESOLVED

2012-02-15 Thread Richard S. Crawford
This has been resolved. A previous programmer had snuck in a function that would convert the value of the "description" field to a date value if it contained the word "Date". This has been fixed. On Tue, Feb 14, 2012 at 5:44 PM, David Robley wrote: > Richard S. Crawford wrote: > > > Bear with m

Re: [PHP] Re: MySQL ID -- what happens when you run out of range?

2010-01-25 Thread John Meyer
On 1/25/2010 1:19 PM, Nathan Rixham wrote: Parham Doustdar wrote: Hello there, A friend called me today and was wondering what happens if the ID colomn of an MYSQL database, set to autoinc reaches the int limit. Will it return and begin choosing the ID's that have been deleted, or... what? you

Re: [PHP] Re: mysql create table with date or timestamp

2009-05-28 Thread Andrew Ballard
On Thu, May 28, 2009 at 11:20 AM, Daniel Brown wrote: > On Thu, May 28, 2009 at 11:15, Andrew Ballard wrote: >> >> Make that a 'comma', not the 'coma' that I seem to be in.  :-) > >    Eh, it's your birthday.  You're allowed.  ;-P > >    Happy birthday, by the way. > Thanks! It's a weak e

Re: [PHP] Re: mysql create table with date or timestamp

2009-05-28 Thread Andrew Ballard
On Thu, May 28, 2009 at 11:15 AM, Andrew Ballard wrote: > 2009/5/28 Grega Leskovsek : >> I GOT THIS ERROR when  I tried first sample with when timestamp; >> >> >> ERROR 1064 (42000): You have an error in your SQL syntax; check the >> manual thatcorresponds to your MySQL server version for the righ

Re: [PHP] Re: mysql create table with date or timestamp

2009-05-28 Thread Daniel Brown
On Thu, May 28, 2009 at 11:15, Andrew Ballard wrote: > > Make that a 'comma', not the 'coma' that I seem to be in.  :-) Eh, it's your birthday. You're allowed. ;-P Happy birthday, by the way. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pi

Re: [PHP] Re: mysql create table with date or timestamp

2009-05-28 Thread Grega Leskovsek
The problem was I didn't type a comma before unique id(iddary). Thanks to everybody for helping me on the seminar. Love, Grega 2009/5/28 LinuxManMikeC : > Actually, AUTO_INCREMENT is the correct syntax for MySQL.  I think the > problem is NOT NULL should come first: iddiary INT NOT NULL > AUTO_I

Re: [PHP] Re: mysql create table with date or timestamp

2009-05-28 Thread Andrew Ballard
2009/5/28 Grega Leskovsek : > I GOT THIS ERROR when  I tried first sample with when timestamp; > > > ERROR 1064 (42000): You have an error in your SQL syntax; check the > manual thatcorresponds to your MySQL server version for the right > syntax to use near 'id(iddiary) )' at line 1 > > > 2009/5/2

Re: [PHP] Re: mysql create table with date or timestamp

2009-05-28 Thread LinuxManMikeC
Actually, AUTO_INCREMENT is the correct syntax for MySQL. I think the problem is NOT NULL should come first: iddiary INT NOT NULL AUTO_INCREMENT. 2009/5/28 João Cândido de Souza Neto : > It´s not auto_increment, it´s auto increment. > > -- > João Cândido de Souza Neto > SIENS SOLUÇÕES EM

Re: [PHP] Re: mysql create table with date or timestamp

2009-05-28 Thread Jo�o C�ndido de Souza Neto
It´s not auto_increment, it´s auto increment. -- João Cândido de Souza Neto SIENS SOLUÇÕES EM GESTÃO DE NEGÓCIOS Fone: (0XX41) 3033-3636 - JS www.siens.com.br "Grega Leskovsek" escreveu na mensagem news:1df2d4810905280748uec4f425kaf14b6410caa...@mail.gmail.com... I GOT THIS ERROR when

Re: [PHP] Re: mysql create table with date or timestamp

2009-05-28 Thread Grega Leskovsek
I GOT THIS ERROR when I tried first sample with when timestamp; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual thatcorresponds to your MySQL server version for the right syntax to use near 'id(iddiary) )' at line 1 2009/5/28 João Cândido de Souza Neto : > If you n

Re: [PHP] Re: MYSQL 5 auto increment not working

2009-05-21 Thread Bastien Koert
On Thu, May 21, 2009 at 9:34 AM, Nathan Rixham wrote: > Leidago !Noabeb wrote: > >> Hi All >> >> >> I know this is not strictly a PHP question, but i have a problem whenever >> i >> insert a record using PHP. Basically the auto increment field does not >> work >> at all. Here's the structure of t

Re: [PHP] Re: MySQL Workbench coming for Linux

2008-09-18 Thread Ross McKay
Luke wrote: >so it's like Microsoft Access? I don't get it... No, Microsoft Access is a development environment sitting on top of a simplistic database (JET). Access gives you a nice GUI to help you interactively build up your database, and it makes a great prototyping tool and data massage tool,

Re: [PHP] Re: MySQL Workbench coming for Linux

2008-09-18 Thread Luke
so it's like Microsoft Access? I don't get it... 2008/9/18 Ross McKay <[EMAIL PROTECTED]> > Bastien Koert wrote: > > >what about dia on llinux? Not quite as nice as visio...but livable > > The Enterprise Architect version of Visio lets you add column > definitions to your entities, add foreign ke

Re: [PHP] Re: MySQL Workbench coming for Linux

2008-09-17 Thread Ross McKay
Bastien Koert wrote: >what about dia on llinux? Not quite as nice as visio...but livable The Enterprise Architect version of Visio lets you add column definitions to your entities, add foreign key relationships, add indices, add comments at the table and column level, and then generate a build sc

Re: [PHP] Re: MySQL Workbench coming for Linux

2008-09-17 Thread Bastien Koert
On Wed, Sep 17, 2008 at 4:13 AM, Ross McKay <[EMAIL PROTECTED]> wrote: > On Wed, 17 Sep 2008 09:00:45 +0100, Luke wrote: > > >What is it? > > > >I'm only familiar with the MySQL tools such as Query Browser and Admin? > > http://dev.mysql.com/downloads/workbench/5.0.html > > In short, it's a data m

Re: [PHP] Re: MySQL Workbench coming for Linux

2008-09-17 Thread Ross McKay
On Wed, 17 Sep 2008 09:00:45 +0100, Luke wrote: >What is it? > >I'm only familiar with the MySQL tools such as Query Browser and Admin? http://dev.mysql.com/downloads/workbench/5.0.html In short, it's a data modelling tool. Such things are very handy for designing and building databases, and usu

Re: [PHP] Re: MySQL Workbench coming for Linux

2008-09-17 Thread Luke
What is it? I'm only familiar with the MySQL tools such as Query Browser and Admin? 2008/9/17 Dax Solomon Umaming <[EMAIL PROTECTED]> > Ross McKay wrote: > > Posting this here, because a few people responded when I mentioned not > > having a Linux-native data modelling tool. Apparently, MySQL Wo

Re: [PHP] Re: MySQL Group?

2008-03-19 Thread Chris
John Taylor-Johnston wrote: Thanks for getting me started. (Sorry, I'm a top quoter.) Below is some working code for the archives. What I've learned so far is that : 1) what I'm referring to in `person` has to be a key. It should be a unique item rather than just a 'key' (indexed item). If y

Re: [PHP] Re: MySQL Group?

2008-03-19 Thread John Taylor-Johnston
Thanks for getting me started. (Sorry, I'm a top quoter.) Below is some working code for the archives. What I've learned so far is that : 1) what I'm referring to in `person` has to be a key. 2) if I want to refer to more than one field from person in shopping, I have to use unique keys. I'm

Re: [PHP] Re: MySQL Group?

2008-03-19 Thread Chris
George J wrote: Hi John, "John Taylor-Johnston" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Does anyone know of a good MySQL group? I want to make a relational link from `data` to `shopping` so when I insert a new record in `shopping`, I will see the contents of `data`.`name`

Re: [PHP] Re: mysql input

2008-02-19 Thread admin
Filter the data $data = str_replace("'", "", $data); I am sure there are many ways to filter the data before insert. (If you are SURE you have "A.D.D." then it wont matter what I say to you.) Rick B. On Feb 18, 2008 11:24 PM, Shawn McKenzie <[EMAIL PROTECTED]> wrote: > nihilism machine w

Re: [PHP] Re: mysql input

2008-02-19 Thread Daniel Brown
On Feb 18, 2008 11:24 PM, Shawn McKenzie <[EMAIL PROTECTED]> wrote: > nihilism machine wrote: > > I have a user saving a VARCHAR(255) field in a mysql db which has single > > quotes in the text, how can i replace them so that they dont fuck up my > > mysql command? > > > > -e > > > Have you tried:

Re: [PHP] Re: mysql input

2008-02-19 Thread Nathan Rixham
Bastien Koert wrote: thats awesome bastien> To: php-general@lists.php.net> Date: Tue, 19 Feb 2008 11:21:02 +> From: [EMAIL PROTECTED]> Subject: Re: [PHP] Re: mysql input> > Zoltán Németh wrote:> > 2008. 02. 19, kedd keltezéssel 11.03-kor Nathan Rixham ezt írta:

RE: [PHP] Re: mysql input

2008-02-19 Thread Bastien Koert
thats awesome bastien> To: php-general@lists.php.net> Date: Tue, 19 Feb 2008 11:21:02 +> From: [EMAIL PROTECTED]> Subject: Re: [PHP] Re: mysql input> > Zoltán Németh wrote:> > 2008. 02. 19, kedd keltezéssel 11.03-kor Nathan Rixham ezt írta:> >> Richard

Re: [PHP] Re: mysql input

2008-02-19 Thread Nathan Rixham
Nathan Rixham wrote: Zoltán Németh wrote: 2008. 02. 19, kedd keltezéssel 11.03-kor Nathan Rixham ezt írta: Richard Heyes wrote: Shawn McKenzie wrote: nihilism machine wrote: I have a user saving a VARCHAR(255) field in a mysql db which has single quotes in the text, how can i replace them so

Re: [PHP] Re: mysql input

2008-02-19 Thread Nathan Rixham
Zoltán Németh wrote: 2008. 02. 19, kedd keltezéssel 11.03-kor Nathan Rixham ezt írta: Richard Heyes wrote: Shawn McKenzie wrote: nihilism machine wrote: I have a user saving a VARCHAR(255) field in a mysql db which has single quotes in the text, how can i replace them so that they dont fuck u

Re: [PHP] Re: mysql input

2008-02-19 Thread Zoltán Németh
2008. 02. 19, kedd keltezéssel 11.03-kor Nathan Rixham ezt írta: > Richard Heyes wrote: > > Shawn McKenzie wrote: > >> nihilism machine wrote: > >>> I have a user saving a VARCHAR(255) field in a mysql db which has single > >>> quotes in the text, how can i replace them so that they dont fuck up my

Re: [PHP] Re: mysql input

2008-02-19 Thread Nathan Rixham
Richard Heyes wrote: Shawn McKenzie wrote: nihilism machine wrote: I have a user saving a VARCHAR(255) field in a mysql db which has single quotes in the text, how can i replace them so that they dont fuck up my mysql command? -e Have you tried: dont_fuck_up_my_mysql_command() Hrmph, I c

Re: [PHP] Re: mysql input

2008-02-19 Thread Richard Heyes
Shawn McKenzie wrote: nihilism machine wrote: I have a user saving a VARCHAR(255) field in a mysql db which has single quotes in the text, how can i replace them so that they dont fuck up my mysql command? -e Have you tried: dont_fuck_up_my_mysql_command() Hrmph, I can't seem to find that

Re: [PHP] Re: MySQL exceptions

2007-04-10 Thread Davi
Em Terça 10 Abril 2007 19:26, Richard Lynch escreveu: > > I don't think MySQL or even mysqli have any kind of exception throwing > yet, if ever. Googling a bit more, I think that MySQL already have some exceptions [1], the question, now, is: how to catch them with PHP? =] I think that just using

Re: [PHP] Re: MySQL exceptions

2007-04-10 Thread Richard Lynch
On Mon, April 9, 2007 6:34 pm, Davi wrote: > Em Segunda 09 Abril 2007 21:21, itoctopus escreveu: >> Use the @ in front of the statement and then check the result if >> it's >> valid. >> >> -- >> itoctopus - http://www.itoctopus.com > > > I already use it, but I believe that try-catch would be _more

Re: [PHP] Re: MySQL exceptions

2007-04-09 Thread Davi
Em Segunda 09 Abril 2007 21:21, itoctopus escreveu: > Use the @ in front of the statement and then check the result if it's > valid. > > -- > itoctopus - http://www.itoctopus.com I already use it, but I believe that try-catch would be _more_ useful... With try-cath I can _get_ more errors instead

RE: [PHP] Re: mysql ORDER BY problem

2006-06-18 Thread Peter Lauri
Just do: SELECT * FROM thetable ORDER BY yourfieldyouwanttoorder If you want it in reverse order you add DESC in the end. /Peter -Original Message- From: John Nichel [mailto:[EMAIL PROTECTED] Sent: Monday, June 19, 2006 5:51 AM To: php-general@lists.php.net Subject: Re: [PHP] Re

Re: [PHP] Re: mysql ORDER BY problem

2006-06-18 Thread John Nichel
Rob W. wrote: It's not in general to mysql, it's how php and mysql is displaying it. That's not what you asked. You asked how to do it with your query, which has nothing, nadda, zip to do with PHP. You want MySQL to do the sorting, look at the MySQL manual under the select syntax, or ask o

Re: [PHP] Re: mysql ORDER BY problem

2006-06-18 Thread Rob W.
It's not in general to mysql, it's how php and mysql is displaying it. - Original Message - From: "Michael Rasmussen" <[EMAIL PROTECTED]> To: Sent: Sunday, June 18, 2006 4:51 PM Subject: [PHP] Re: mysql ORDER BY problem On Sun, 18 Jun 2006 15:55:14 -0500, Rob W. wrote: Is there

Re: [PHP] Re: mysql table row updation based on user input.

2005-09-18 Thread Jasper Bryant-Greene
John Taylor-Johnston wrote: Me thinks you have to name the checkboxes differently, otherwise the post variable will only take the last value it found, overwriting previous values. Otherwise they act like radioboxes. print " "; No, he's passing an array of checkboxes -- see the

Re: [PHP] Re: MySql injections....

2005-05-11 Thread Richard Lynch
On Wed, May 11, 2005 3:36 am, M. Sokolewicz said: > [EMAIL PROTECTED] wrote: > >> Hi, >> This is not the proper list to put this question but i hope you can help >> me. >> Does anyone know a good tutorial about mysql injections? >> >> Thanks a lot for your help >> >> > what's there to make a tutori

Re: [PHP] Re: MySQL empty row

2005-04-05 Thread GamblerZG
DB Error: constraint violation What DB do you use? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: MySQL empty row

2005-04-04 Thread Neo Theone
GamblerZG wrote: Please replace die($res->getMessage()) with user_error($res->getMessage(), E_USER_ERROR) and then post the output. on one table it still does not work: this is the error: DB Error: constraint violation -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:

Re: [PHP] Re: MySQL empty row

2005-04-04 Thread Neo Theone
GamblerZG wrote: Please replace die($res->getMessage()) with user_error($res->getMessage(), E_USER_ERROR) and then post the output. If I uncomment this it seems to work. Not error or anything in the code. Truely don't know what the error is. -- PHP General Mailing List (http://www.php.net/) To un

Re: [PHP] Re: mysql problems

2005-03-04 Thread Richard Lynch
Jed R. Brubaker wrote: > Thank you both for your responces. > > Unfotuantely there is no form that instantiates this action. So the double > submit (while a good idea), is not possible. > > As for some sample code, it is part of a rather complicated system that > makes a number of changes but essen

Re: [PHP] RE: MySQL & PHP Examples & Training Providers Required

2004-08-12 Thread Harlequin
Jay, guys. Thanks very much for all your responses on this issue. I'm sorry if I don't always reply through the group but if I am working from the office I have a problem connecting to the mailing list. which is just one of the reasons I prefer working from home. I, along with your help, have ins

RE: [PHP] RE: MySQL & PHP Examples & Training Providers Required

2004-08-12 Thread Jay Blanchard
[snip] > On Wed, 11 Aug 2004 18:20:23 -0400, Lukasz Karapuda <[EMAIL PROTECTED]> wrote: >>Why I chose to reply to your email is because PHP is not usually used for >>the development of more complex functionality like the Web site module that >>we have developed. > > I beg to differ. Many large and

Re: [PHP] RE: MySQL & PHP Examples & Training Providers Required

2004-08-11 Thread Lester Caine
Justin Patrin wrote: On Wed, 11 Aug 2004 18:20:23 -0400, Lukasz Karapuda <[EMAIL PROTECTED]> wrote: Why I chose to reply to your email is because PHP is not usually used for the development of more complex functionality like the Web site module that we have developed. I beg to differ. Many large an

Re: [PHP] RE: MySQL & PHP Examples & Training Providers Required

2004-08-11 Thread Justin Patrin
On Wed, 11 Aug 2004 18:20:23 -0400, Lukasz Karapuda <[EMAIL PROTECTED]> wrote: > Michael, > > My company has recently developed a Web site module for a local > manufacturing company. The Web site module is a PHP and MySQL application > composed of several screens and advanced engineering functiona

Re: [PHP] Re: [mysql]Problem with PHP5

2004-07-19 Thread [EMAIL PROTECTED]
Ciprian, I may have missed whether or not you were able to resolve your problem from a couple days ago. In one of my development environments (Win2K), I decided to install PHP 5.0 with MySQL(i) 4.1.x support in IIS5.0 and Apache 2 (running on different ports). It took a bit more work than I in

Re: [PHP] Re: MySQL Database Connection Question

2004-07-08 Thread Afan Pasalic
Oh! :-) Thanks... John Nichel wrote: Afan Pasalic wrote: Daniel Kullik wrote: Note: You should checkout the thread 'Form Submission' started on July 6th since this is appearently not the best way to check if the user hit the submit-button. Daniel July 6th? What are you talking about? Can you p

Re: [PHP] Re: MySQL Database Connection Question

2004-07-08 Thread Daniel Kullik
John Nichel wrote: Afan Pasalic wrote: Daniel Kullik wrote: Note: You should checkout the thread 'Form Submission' started on July 6th since this is appearently not the best way to check if the user hit the submit-button. Daniel July 6th? What are you talking about? Can you please give me more

Re: [PHP] Re: MySQL Database Connection Question

2004-07-08 Thread Daniel Kullik
Afan Pasalic wrote: July 6th? What are you talking about? Can you please give me more info about that? afan Daniel Kullik wrote: Note: You should checkout the thread 'Form Submission' started on July 6th since this is appearently not the best way to check if the user hit the submit-button. Da

Re: [PHP] Re: MySQL Database Connection Question

2004-07-08 Thread John Nichel
Afan Pasalic wrote: Daniel Kullik wrote: Note: You should checkout the thread 'Form Submission' started on July 6th since this is appearently not the best way to check if the user hit the submit-button. Daniel July 6th? What are you talking about? Can you please give me more info about that? a

Re: [PHP] Re: MySQL Database Connection Question

2004-07-08 Thread Afan Pasalic
July 6th? What are you talking about? Can you please give me more info about that? afan Daniel Kullik wrote: Note: You should checkout the thread 'Form Submission' started on July 6th since this is appearently not the best way to check if the user hit the submit-button. Daniel -- PHP General

Re: [PHP] RE: MySQL Results Not Being Committed To Database

2004-07-03 Thread Torsten Roehr
"John W. Holmes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > >> $query = mysql_query($sql); > >> $mysql_result = mysql_query ($sql, $Connection) or die ("Invalid > >>Query - " . mysql_error()); > > You're running the query twice. Take out that first line. Michael, that's where y

Re: [PHP] RE: MySQL Results Not Being Committed To Database

2004-07-03 Thread John W. Holmes
$query = mysql_query($sql); $mysql_result = mysql_query ($sql, $Connection) or die ("Invalid Query - " . mysql_error()); You're running the query twice. Take out that first line. And I second the recommendation to please reply to the list and not individuals unless they request it. -- --

RE: [PHP] Re: MySQL QUERY Results Not Appearing[Scanned]

2004-07-02 Thread Michael Egan
Don't know that this will work but it might help isolate the problem: /* MySQL Connection Variables */ $host="localhost"; $user="arras_WebMaster"; $password="qwerty"; $dbase="arras_Members"; /* MySQL Connection String */ if(!$dbConnect = @mysql_connect ("$host", "$user", "$password")) {

RE: [PHP] Re: Mysql Problem

2004-05-28 Thread Ian Barnes
Hi, Yes that was my mistake. But even with the code, it still doesnt display the last one. If i didnt put a " it wouldnt work at all. Thanks, Ian -Original Message- From: Torsten Roehr [mailto:[EMAIL PROTECTED] Sent: 28 May 2004 13:56 To: [EMAIL PROTECTED] Subject: [PHP] Re: Mysql Proble

RE: [PHP] Re: MySQL: Order by

2004-02-05 Thread Angelo Zanetti
make your column of type int column -Original Message- From: Ben Ramsey [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 7:52 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] Re: MySQL: Order by I assume "number" is a column name in your table. If so, I'm also guess

RE: [PHP] Re: MySQL query problems

2003-07-16 Thread Beauford.2005
Not sure what the problem was, but I dug up a similar script I used for something else and modifed it for this project, and voila. I then put the two side by side and I still can't see where the problem is. Thanks for the input. -Original Message- From: Nomadeous [mailto:[EMAIL PROTECTED

Re: [PHP] Re: Mysql DB connect failure

2003-02-23 Thread Sunfire
purposfully make an error: mysql_connect("localhost", "root", "")||die(mysql_error()); i get the message above about the error - Original Message - From: "Hans Prins" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 21, 2003

Re: [PHP] Re: Mysql DB connect failure

2003-02-21 Thread ML
Thanks rick, that is a much cleaner solution! "Rick Emery" <[EMAIL PROTECTED]> wrote in message 009f01c2d9c1$51171d20$0500a8c0@honeybee">news:009f01c2d9c1$51171d20$0500a8c0@honeybee... > $db = mysql_pconnect("localhost", "test1", "test1") or die(mysql_error()); > > - Original Message - >

Re: [PHP] Re: Mysql DB connect failure

2003-02-21 Thread ML
I see that its looking for mysql.sock in /tmp/mysql.sock but I searched on my system and only found mysql.sock in /var/lib/mysql/ is there a section where I need to change this setting? or a conf file? "Hans Prins" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

Re: [PHP] Re: Mysql DB connect failure

2003-02-21 Thread ML
You were right Prins, I got the error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) So I guess I need to investigate what this means now... Thanks! -ML "Hans Prins" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Would you care t

Re: [PHP] Re: Mysql DB connect failure

2003-02-21 Thread Hans Prins
> Would you care to explain to the rest of the list how you intend to use > mysql_error () to return connection failure information? > > It returns the text of the error message from previous MySQL operation > Description: string mysql_error ( [resource link_identifier]) > > Seems to me that withou

Re: [PHP] Re: Mysql DB connect failure

2003-02-21 Thread Jason k Larson
Would you care to explain to the rest of the list how you intend to use mysql_error () to return connection failure information? It returns the text of the error message from previous MySQL operation Description: string mysql_error ( [resource link_identifier]) Seems to me that without a connect

Re: [PHP] Re: MySQL for storing PHP code

2003-02-10 Thread Tom Rogers
Hi, Tuesday, February 11, 2003, 7:39:16 AM, you wrote: DP> Thanks for the comments everyone! eval() has just made my day :) DP> Cheers, DP> Daniel DP> "Daniel Page" <[EMAIL PROTECTED]> a écrit dans le message de news: DP> [EMAIL PROTECTED] >> Hi, >> >> Would it be possible to store PHP code in

Re: [PHP] Re: MySQL/PHP Associative Array Insert

2003-02-03 Thread michael kimsal
Chris Shiflett wrote: --- Cditty <[EMAIL PROTECTED]> wrote: A co-worker is teaching me to move to the next level in php. I have started using associative arrays for my scripts, but I am having a problem using them to do an insert into MySQL. Can someone give me an example of how to do an insert

Re: [PHP] Re: MySQL/PHP Associative Array Insert

2003-02-02 Thread Chris Shiflett
--- Cditty <[EMAIL PROTECTED]> wrote: > A co-worker is teaching me to move to the next level > in php. I have started using associative arrays for my > scripts, but I am having a problem using them to do an > insert into MySQL. Can someone give me an example of > how to do an insert to the database

Re: [PHP] Re: MySQL back up

2002-10-10 Thread Ken
Okay, I took out all the reason for error, I took the variables out of the code and replaced them with the actual values. I do not execute the gzip function. All I get is an empty file. Also I made sure the back up directory is set to 777. Now phpMySQLAdmin will perform the same function, so ther

RE: [PHP] Re: MySQL back up

2002-10-10 Thread Daniel Masson
- Soluciones web para internet e intranet - Asesoría y Soporte Técnico - Licenciamiento de Software -Mensaje original- De: Ken [mailto:[EMAIL PROTECTED]] Enviado el: miércoles, 09 de octubre de 2002 22:36 Para: [

RE: [PHP] Re: MySQL back up

2002-10-10 Thread John W. Holmes
> Okay here is the new code and this is still not working. > > > require("./config.php"); > > $sqlserver = $server1; > $sqlusername = $username1; > $sqlpassword = $password1; > $sqldatabase = $database1; > > //** > $nam_bak=date('D,d-m-Y'); Can you have a filename

Re: [PHP] Re: MySQL back up

2002-10-09 Thread Owen Prime
Haven't really been following this thread but you may want to make sure that 1. mysqldump & gzip are executable by apache 2. $backupdir is writeable by apache 3. You have taken into consideration your php safe mode settings Cheers, Owen Prime http://www.noggin.com.au Ken wrote: > Okay here is

Re: [PHP] Re: MySQL back up

2002-10-09 Thread Ken
Okay here is the new code and this is still not working. $backupdir/$nam.sql"); exec("gzip $backupdir/$nam.sql"); ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Re: MySQL back up

2002-10-09 Thread Daniel Masson
I agree everything, but Im not very sure if this is going to work: > $backup=@passthru("mysqldump --opt \"$sqldatabase\" > > $backupdir/$nam.sql"); You need to send mysqldump the username and password. Syntax is Mysqldump -uuser -ppassword databasename > fi

RE: [PHP] Re: MySQL back up

2002-10-09 Thread John W. Holmes
> -Original Message- > From: Ken [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 09, 2002 7:25 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Re: MySQL back up > > Here is the code I tired to use: > > > session_start(); You don't need to start a session... > require("./config.ph

RE: [PHP] Re: MySQL back up

2002-10-08 Thread John W. Holmes
> Why don't you just do a hard backup of the files from the db. Find out the > location of the data folder where thd db saves its tables, perform a tar > cvzf data_folder and then pipe it directly to the user for download via > http. > > Havent tryed it that way, but should work. Another thing wo

Re: [PHP] Re: MySQL Problem

2002-10-03 Thread OrangeHairedBoy
Well, that's just a typo...of course there should be a () to make it call a function... The whole point to my postings is that I can't get the darn variable to stay in place!!! Look where it says "Prints NOTHING". Does anyone know why it doesn't print "Hello World"??? ::Lewis "Mike Ford" <[EM

RE: [PHP] Re: MySQL Problem

2002-10-03 Thread Ford, Mike [LSS]
> -Original Message- > From: OrangeHairedBoy [mailto:[EMAIL PROTECTED]] > Sent: 03 October 2002 09:39 > > Here's a simplier version...and I'm still having a problem > with it. It's > driving me insane!!! :) > > class MySQL > { > function SET ( ) > { > $this->MYVAR = "Hello World!"

Re: [PHP] Re: MySQL Problem

2002-10-03 Thread OrangeHairedBoy
I thought someone might mention that, but that is actually correct. The problem is that the variable assigned on the line $this->DBLink[$MyVars[NAME]] = mysql_connect( $MyVars[HOST] , $MyVars[USERNAME] , $MyVars[PASSWORD] ); dissapears and can't be retreived on the line mysql_select_db( $MyVars[D

Re: [PHP] Re: MySQL Problem

2002-10-03 Thread Tom Rogers
Hi, Thursday, October 3, 2002, 6:01:53 PM, you wrote: O> You know...maybe I should mention where this code is... O> I have my main file which loads using 'require.once' a second file called O> 'everything.php'. O> Inside everything.php is a class called 'mainclass' which is called by the O> mai

Re: [PHP] Re: mysql timestamp and php date

2002-09-30 Thread Bryan Koschmann - GKT
This is what I am using here: $db = DB::connect("mysql://$username:$password@$hostName/$databaseName"); if (DB::iserror($db)) die($db->getMessage()); $sql = "SELECT idnum, title, DATE_FORMAT(date, '%W, %M %D \@ %l:%i%p'), news FROM newslist ORDER BY idnum DESC"; $query = $db->query($sq

Re: [PHP] Re: mysql timestamp and php date

2002-09-30 Thread Jason Young
No problem! Refresh MY memory here.. I noticed you didn't return the DATE_FORMAT column "AS " .. is that working okay? I seemed to think that it returned a long unwieldy column name.. maybe things are good.. let me know :-D --Jason Bryan Koschmann - Gkt wrote: > Hi Jason, > > I had come ac

Re: [PHP] Re: mysql timestamp and php date

2002-09-30 Thread Bryan Koschmann - GKT
Hi Jason, I had come across this earlier, and while I can get it to return perfectly, I was more looking for something that I could do without having to pull 2 queries. Err, well wait, I wouldn't have to would I? I have 4 columns: idnum, title, date, news I was just doing a select * from newlis

Re: [PHP] Re: MySQL > Access

2002-09-20 Thread Liam MacKenzie
Thanks. That's fine, it's either $55 for this or a couple of hundred to pay someone to do it manually. Go figure ;-) Cheers, Liam - Original Message - From: "M1tch" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, September 21, 2002 3:51 AM Subject: [PHP] Re: MySQL > Acces

RE: [PHP] Re: mysql query

2002-09-11 Thread David Buerer
") or die (mysql_error()); $row=mysql_fetch_array($result); $euro =$row[0]; -Original Message- From: bill [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 11, 2002 7:50 AM To: David Buerer Subject: Re: [PHP] Re: mysql query Maybe I wasn't clear. The value returned should

RE: [PHP] Re: mysql query

2002-09-11 Thread David Buerer
Look into the LIMIT command, it will limit the number of rows in the result set to the number you specify -Original Message- From: bill [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 11, 2002 7:10 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: mysql query function mysql_one_element(

Re: [PHP] Re: mysql statement (still a semi newbie)

2002-08-14 Thread Sascha Braun
I'm always making my inserts like this: $Insert = "INSERT INTO basket_db (name, image_id, customer_id, session_id) "; $Insert .= "VALUES ('$name', '$image_id', '$customer_id', '$PHPSESSID')"; ...and I'm using the SET Field = '$Value' in the Update Querys like this: $UpdateQuery = "UPDATE produk

RE: [PHP] Re: mysql statement (still a semi newbie)

2002-08-14 Thread César Aracena
Tim's right about NULL. You can either specify what exactly are the fields of the row you want to update/insert using SET before VALUE (seek the manual at www.mysql.com for more info) or you can just write NULL (without any quotes) where the fields are automatic like *auto_increment* or like *time

Re: [PHP] Re: MySQL - PHP combined log

2002-07-24 Thread PHPCoder
Well, I think the solutions or ideas are maybe a bit too involved. I was hoping that the errors I am interested in were already logged by default to some obscure location, and I *could* if needed just go and scrutinize them by hand. But, it seems like a detailed (specially mysql) error log does

RE: [PHP] Re: MySQL - PHP combined log

2002-07-24 Thread Dave
>> how about this curve... getting PHP to append a line to the apache log. >>> >>>How about reading the documentation? >> >>Deserved that for not being clear enough... see below. > >My apologies if I missed the word "access log" or even assumed you meant >"error log" when you just said "log."

Re: [PHP] Re: MySQL - PHP combined log

2002-07-23 Thread Richard Lynch
> >>>how about this curve... getting PHP to append a line to the apache log. >> >>How about reading the documentation? > >Deserved that for not being clear enough... see below. My apologies if I missed the word "access log" or even assumed you meant "error log" when you just said "log."I sho

RE: [PHP] Re: MySQL - PHP combined log

2002-07-23 Thread Dave [Hawk-Systems]
>>how about this curve... getting PHP to append a line to the apache log. > >How about reading the documentation? Deserved that for not being clear enough... see below. >http://php.net/error_log > >>would much rather pump the clf formatted log sting directly into the >appropriate >>apache log,

Re: [PHP] Re: MySQL - PHP combined log

2002-07-23 Thread Richard Lynch
>Thanks, but all these "methods" require modification of the scripts >already on the server, and it won't ensure any new script being written >by a user on my system to comply. That is correct. >Are you all saying that there are no logs kept by default of errors >generated on php/mysql pages

Re: [PHP] Re: MySQL - PHP combined log

2002-07-23 Thread Richard Lynch
> >>>I want to be able to view a single log that contains the following: > >> >>http://php.net/error_log >> > >how about this curve... getting PHP to append a line to the apache log. How about reading the documentation? http://php.net/error_log >would much rather pump the clf formatted log sti

RE: [PHP] Re: MySQL - PHP combined log

2002-07-23 Thread John Holmes
QL. You'll still have the problem of identifying which PHP page caused the MySQL error, though... ---John Holmes... > -Original Message- > From: PHPCoder [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 23, 2002 2:23 AM > To: Richard Lynch > Cc: php-general > Subject: R

Re: [PHP] Re: MySQL - PHP combined log

2002-07-22 Thread PHPCoder
Thanks, but all these "methods" require modification of the scripts already on the server, and it won't ensure any new script being written by a user on my system to comply. Are you all saying that there are no logs kept by default of errors generated on php/mysql pages at all unless specifical

RE: [PHP] Re: MySQL - PHP combined log

2002-07-22 Thread Dave [Hawk-Systems]
>>I want to be able to view a single log that contains the following: > >http://php.net/error_log > how about this curve... getting PHP to append a line to the apache log. Currently we are exporting via fopen clf formatted logs for file uploads (whose file sizes are not recorded by Apache's l

RE: [PHP] Re: MySQL fetch data

2002-07-01 Thread Cal Evans
Jeff, Also, try php.weblogs.com ADODB if you absolutly MUST have all of your data in an array. I'll agree with Richard that it's not a great idea unless there is a specific need. While loops for displaying the contents of many records are much better. (IMHO, etc...) =C= * * Cal Evans * Journe

Re: [PHP] Re: MySQL Problem with PHP

2002-06-26 Thread Erik Price
On Wednesday, June 26, 2002, at 08:58 AM, John Holmes wrote: >> I just preg_replace("/\'/","\'",$text) and all was good :o) > > That's what addslashes() is for. It handles single and double quotes, > backslashes, and nulls, so you won't have any problems... Plus IIRC it's a C extension so it'l

RE: [PHP] Re: MySQL Problem with PHP

2002-06-26 Thread John Holmes
> I just preg_replace("/\'/","\'",$text) and all was good :o) That's what addslashes() is for. It handles single and double quotes, backslashes, and nulls, so you won't have any problems... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.p

RE: [PHP] Re: MySQL or FlatFile

2002-05-13 Thread webmaster
I am very new to PHP(Still awaiting a book, Only done a few tutorials and read bits of the PHP manual).   But if you used: mysql_pconnect($host, $user, $password) It would keep a consistant connection to the database so it may speed things up a bit.   JJ Harrison[EMAIL PROTECTED]www.tececo.co

RE: [PHP] Re: MySQL or FlatFile

2002-05-12 Thread Martin Towell
If the content is going to be the same each time, then loading from a flat-file would probably be better, because accessing a database would require the connection to be established, the database to parse and execute your query, then send that data back. Where as reading from the file, it's just o

  1   2   >