I wrote:
Delete the records from the table:
mysql_query(DELETE FROM table WHERE timestamp = '$timestamp') or
die('Could not delete from table');
That query should be
DELETE FROM table WHERE timestamp = '$timestamp'
Sorry about that.
Albert
--
No virus found in this outgoing message.
Gregory,
David Grant wrote:
Gregory Machin wrote:
I have a table with a timestamp column and would like to use his to
calculate the age of the record . how would i go about this...
I would also like to exicute a mysql stament that pasess the tables and
removes fields older than say 72 hours.
David Grant wrote:
Gregory,
David Grant wrote:
Gregory Machin wrote:
I have a table with a timestamp column and would like to use his to
calculate the age of the record . how would i go about this...
I would also like to exicute a mysql stament that pasess the tables and
removes fields
Am 2005-12-27 08:03:42, schrieb Dave Carrera:
Hi List,
User input is a so the list moves to first instance of a. User
continues to input ap so the list moves to 2 Apple Customer and so on.
This can only be done from a JavaScript.
Thank you in advance
Dave c
Greetings
Michelle
--
Hello,
My ISP updated their MySQL DB to 5.0.18 and that killed my login procedure
which was OK yesterday. Any ideas how to start to debug this?
The login updates 2 fields in users table row where username and password
macthes. This is the code:
if (!$query = mysql_query(update tbl_users set
It seems the upgrade was from Mysql 4.0. PASSWORD() function changed
between 4.0 and 4.1, it uses longer hashes now. You can still use
OLD_PASSWORD() function instead.
William Stokes wrote:
Hello,
My ISP updated their MySQL DB to 5.0.18 and that killed my login procedure
which was OK
Thanks!
-W
M [EMAIL PROTECTED] kirjoitti
viestissä:[EMAIL PROTECTED]
It seems the upgrade was from Mysql 4.0. PASSWORD() function changed
between 4.0 and 4.1, it uses longer hashes now. You can still use
OLD_PASSWORD() function instead.
William Stokes wrote:
Hello,
My ISP updated
Any Senior PHP/MySQL Developers in the Los Angeles area looking for work? If
so, send me your resume. I've got multiple clients. 70-100k range.
Thank you,
Beau Gould
www.superiorss.com
[EMAIL PROTECTED]
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version
Here's one thought . ascii (97) is the letter a is it
possible that the ascii (65) A was interpreted as lowercase thus
creating a duplicate primary key? Or your DBMS doesn't make a
distinction between upper or lower case.
You are correct. I compiled mysql and php from source tar-ball.
A table with a column big5 char(2) not null primary key.
$target-query(delete from canton);
for ($ii=0; $ii256; $ii++) {
for ($jj=0; $jj256; $jj++) {
echo $ii ... $jj . \n;
$query=insert into canton ( big5 ) values ( '
. mysql_real_escape_string(chr($ii).chr($jj))
Man-wai Chang wrote:
A table with a column big5 char(2) not null primary key.
$target-query(delete from canton);
for ($ii=0; $ii256; $ii++) {
for ($jj=0; $jj256; $jj++) {
echo $ii ... $jj . \n;
$query=insert into canton ( big5 ) values ( '
.
You're right when you say this has nothing to do with PHP. Well, mostly
right. I don't believe he is looking for a select box solution. I believe
what is being looked for is a Google Suggest style input box auto-complete
solution. Now you were right to say this is heavily dependant on JavaScript
On Tue, December 27, 2005 2:03 am, Dave Carrera wrote:
I have a very long list of customer names which i know is easy to get
from a mysql result using php, no prob there.
How long is very long?...
But what i would like to do is offer input box and when the user
enters
a letter, i think this
Hi -
It sounds like you're trying to implement something similar to google
suggest which uses ajax to allow a user to navigate through a large
list of entries. The google suggest method does use a lot of calls
to the database but its asynchronous which eliminates cumbersome page
loads.
Hi List,
I have a very long list of customer names which i know is easy to get
from a mysql result using php, no prob there.
But what i would like to do is offer input box and when the user enters
a letter, i think this will require client side onchange(), the full
list, i think might be in
Hello,
I Have MySQL 4.1.14 and 5.0.15 installed on my Windows XP Pro SP2.
There are installed in D:\Tools\MySQL\MySQL Server 4.1.14 and MySQL Server
5.0.15 for the version 5. They work on port 3306 and 3307.
When I try a DB connection, I receive this error:
File
From: Christian Ista [mailto:[EMAIL PROTECTED] File
'c:\mysql\share\charsets\?.conf' not found (Errcode: 2) Character set
'#33' is not a compiled character set and is not specified in the
'c:\mysql\share\charsets\Index' file Resource id #5
I answer to myself.
In fact I reinstall MySQL 4.x
Could you direct me towards any good resources on general security with
php/mysql?
http://phpsec.org/library/
Make sure to read these:
- data filtering
- sql injection
. . .and all the others in time. =)
I don't know what is the problem. I'm using the GNU GCC and GNU Biutils.
--snip--
./configure --with-mysqli=../../mysql/bin/mysql_config --with-apxs2=../../ap
ache2/bin/apxs --with-unixODBC --with-openssl --with-curl --disable-libxml -
-disable-dom --enable-track-vars --enable-ftp
On Mon, Dec 19, 2005 at 02:56:37PM -0500, Scott Fletcher wrote:
I don't know what is the problem. I'm using the GNU GCC and GNU Biutils.
--snip--
./configure --with-mysqli=../../mysql/bin/mysql_config --with-apxs2=../../ap
ache2/bin/apxs --with-unixODBC --with-openssl --with-curl
more or less working now and need to look at
security issues. Thanks for the tip about SQL injection - had no idea
what this was, but googling it proved very interesting - scary stuff!
Could you direct me towards any good resources on general security with
php/mysql?
Thanks again
Paul.
--
PHP
Hi all,
I have a site where users can search study projects. I'd like to be able
to clicks on a project title which passes a variable to this page, which
then displays all the data on that project in a table. Cool - and to a
noob like me, actually pretty exciting. Except it doesn't work.
I
Paul Jinks wrote:
$SQLQuery = SELECT * FROM project WHERE
projTitle = .$HTTP_GET_VARS['projTitle']
or die(SQLQuery 1 failed);
$SQLQuery = SELECT * FROM project WHERE projTitle = ' .
$HTTP_GET_VARS['projTitle'] . ';
Not sure why you've got the or die() there.
On 16 Dec 2005, at 12:30, Paul Jinks wrote:
I have a site where users can search study projects. I'd like to be
able to clicks on a project title which passes a variable to this
page, which then displays all the data on that project in a table.
Cool - and to a noob like me, actually pretty
David Grant wrote:
$SQLQuery = SELECT * FROM project WHERE projTitle = ' .
$HTTP_GET_VARS['projTitle'] . ';
Yep, that fixed it. Thanks. I had a feeling there was a mix up with the
s and 's. What's with the . s?
Not sure why you've got the or die() there.
I had the idea that you could
Richard Davey wrote:
($HTTP_GET_VARS), because lots do not. I would suggest replacing
$HTTP_GET_VARS with $_GET (in all instances), because the long format
will eventually vanish and your script will cease to work.
Cheers Rich, will sort this out.
I assume you removed the MySQL details
Paul,
Paul Jinks wrote:
David Grant wrote:
$SQLQuery = SELECT * FROM project WHERE projTitle = ' .
$HTTP_GET_VARS['projTitle'] . ';
Yep, that fixed it. Thanks. I had a feeling there was a mix up with the
s and 's. What's with the . s?
The . is a concatenation operator, i.e. it joins two
@lists.php.net
Subject: Re: [PHP] PHP/MySQL noob rides again.. into trouble
David Grant wrote:
$SQLQuery = SELECT * FROM project WHERE projTitle = ' .
$HTTP_GET_VARS['projTitle'] . ';
Yep, that fixed it. Thanks. I had a feeling there was a mix
up with the s and 's. What's with the . s
hi,
can someone tell me how to do this:
i have to retrive data from a mysql table let's sayTABLE . i have to
check that the rows i retrive meet this condition:
field1='$variable',field2 is false and field3 is also false. as you
can see field2 and field3 are bool type. field1 is varchar. i did
[snip]
can someone tell me how to do this:
i have to retrive data from a mysql table let's sayTABLE . i have to
check that the rows i retrive meet this condition:
field1='$variable',field2 is false and field3 is also false. as you
can see field2 and field3 are bool type. field1 is varchar. i
the page I get this:
pResult of bSELECT projTitle FROM project/b/p
p
br /
br /
br /
br /
/p
There are indeed 4 entries in the database, but I can't figure out why
it's not displaying the data. It worked fine on my PHP/Mysql-in-a-box
course. No, we
Hi,
I´ve got a web project that daily offers 4 o 5 mp3 files recorded by me.
From an web based interface I populate a database with titles, descripcion,
images and the path for the mp3 file in the server
The cuestion is I would like to offer the content for Ipod, using
ipodcasting. Then I have
On Dec 9, 2005, at 3:45 AM, Danny wrote:
How to proceed
I recently set-up my first Podcast... Every week I have a script that
grabs three MP3 files from a remote server and puts them on my own
server... Then I have another script that generates the Podcast XML.
I am using CRON jobs
projTitle FROM project/b/p
p
br /
br /
br /
br /
/p
There are indeed 4 entries in the database, but I can't figure out why
it's not displaying the data. It worked fine on my PHP/Mysql-in-a-box
course. No, we didn't study the syntax :(
Any help gratefully received
Hi Paul,
Why you are closing your connection before finishing your work on
the database?
Zareef Ahmed
- Original Message -
From: Paul Jinks [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Friday, December 09, 2005 6:50 AM
Subject: [PHP] PHP/MySql noob falls at first
On 12/9/05, Paul Jinks [EMAIL PROTECTED] wrote:
Hi all
I've been asked to put simple database interactivity on an academic
site. They want users to enter a few details of their projects so other
researchers can search and compare funding etc. How difficult can that
be, I thought
I've
Jinks [mailto:[EMAIL PROTECTED]
Sent: 09 December 2005 11:51
To: php-general@lists.php.net
Subject: [PHP] PHP/MySql noob falls at first hurdle
Hi all
I've been asked to put simple database interactivity on an academic
site. They want users to enter a few details of their projects so other
Are short tags disabled? Change this line...
?=$output_row[projTitle]?br /
To...
?php echo ( $output_row[projTitle] ) ?br /
This line seems to work :
pResult of b?=$SQLquery ?/b/p
--
Brice Favre
http://pelmel.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Brice wrote:
Try to check the key of your result row with a print_r or a var_dump command.
Brice Favre
http://pelmel.org/
Like this?
?php
while($ouput_row = mysql_fetch_array($result))
print_r($output_row);
?
Apologies if this is pathetically wrong. Like I
Paul Jinks wrote:
snip
?
while($ouput_row = mysql_fetch_array($result)) {
?
?=$output_row[projTitle]?br /
snip
Paul - is this the actual code that you are using? - because you have a
typo in your while statement - $ouput_row instead of $output_row - means
that when you
PROTECTED]
Sent: 09 December 2005 15:05
To: php-general@lists.php.net
Subject: Re: [PHP] Re: PHP/MySql noob falls at first hurdle
Brice wrote:
Try to check the key of your result row with a print_r or a var_dump
command.
Brice Favre
http://pelmel.org/
Like this?
?php
On 12/9/05, Paul Jinks [EMAIL PROTECTED] wrote:
Brice wrote:
Try to check the key of your result row with a print_r or a var_dump
command.
Brice Favre
http://pelmel.org/
Like this?
?php
while($ouput_row = mysql_fetch_array($result))
print_r($output_row);
Paul Jinks wrote:
Rory McKinley wrote:
Paul Jinks wrote:
snip
?
while($ouput_row = mysql_fetch_array($result)) {
?
?=$output_row[projTitle]?br /
snip
Paul - is this the actual code that you are using? - because you have a
typo in your while statement - $ouput_row
I would hate to see a time clock that tabulated how many hours I
wasted with typos and stupid things like that.
On 12/9/05, Rory McKinley [EMAIL PROTECTED] wrote:
Paul Jinks wrote:
Rory McKinley wrote:
Paul Jinks wrote:
snip
?
while($ouput_row =
For future reference, during testing, you can set your error reporting
levels ( i think) in php.ini to output a notice regarding a variable
that does not exist - would have helped you spot the error! I normally
use the Zend debugger which does quite a good job of telling me that I
am an
Simply Fantastic!. Thanks a lot!
So for me the best solution I think, would be to read the MySQL Table, and
produce the XML with a given template from a PHP Script.
I will use Scheduled Task instead of CRON... (Sorry, working on windows ;-)
)
[Off topic] Could it be tested without an IPod
On Dec 9, 2005, at 1:45 PM, Danny wrote:
Simply Fantastic!. Thanks a lot!
Sure thing, I am glad that I was able to help/give you some ideas. :)
So for me the best solution I think, would be to read the MySQL Table,
and produce the XML with a given template from a PHP Script. I will
use
I need to know is: given the code below, are there any
examples of php/mysql driven mailing list scripts that I can use as a
tutorial on helping me to convert mine to a mysql database driven
program?
Any ideas/recommendations would be apreciated. Thanks for all the help.
The code
HI All,
Does anyone on here use the MySQL C API? Would you mind if I asked
you a few questions off the list?
Thanks,
--
Leonard Burton, N9URK
[EMAIL PROTECTED]
The prolonged evacuation would have dramatically affected the
survivability of the occupants.
--
PHP General Mailing List
On Fri, Nov 18, 2005 at 09:34:56AM -0500, Leonard Burton wrote:
HI All,
Does anyone on here use the MySQL C API? Would you mind if I asked
you a few questions off the list?
You might want to ask someone on a related mysql list.
Curt.
--
--
PHP General Mailing List (http://www.php.net/)
Can anyone point me to a good User Authentication class written in PHP
(Version 5 preferably) that uses MySQL as the backend. If the output is
valid XHTML then even better. There are lots of hits on Google but I
need some help sorting the wheat from the chaff.
It's for a hobbyist site so I'm
Alan Milnes wrote:
Can anyone point me to a good User Authentication class written in PHP
(Version 5 preferably) that uses MySQL as the backend. If the output is
valid XHTML then even better. There are lots of hits on Google but I
need some help sorting the wheat from the chaff.
it might
While I think this is primarily a mysql syntax problem I have asked on the
mysql forum but not got a reply. I am trying using php to set up a system for
loading a new data base using the Load Data Infile statement. I could not get
it to work properly with php so I thought I would try some
I have 2 tables:
products table
product_id (INT 11 AUTOINCRE PRI)
product_name (VARCHAR 255)
product_desc (VARCHAR 255)
color table
color_id (INT 11 AUTOINCRE PRI)
color (VARCHAR 255)
image (VARCHAR 255)
product_id (INT 11)
I would like to create the first select box (pulling the options from
Try asking in a newsgroup or forum specific to javascript, that has
nothing to do with PHP
Adele Botes wrote:
I have 2 tables:
products table
product_id (INT 11 AUTOINCRE PRI)
product_name (VARCHAR 255)
product_desc (VARCHAR 255)
color table
color_id (INT 11 AUTOINCRE PRI)
color (VARCHAR
I have just installed MySql on Win XP and am attempting to run a php script to
create some databases. The script works fine on FreeBSD 5.3 running
mysql-client-5.0.11 and mysql-server-5.0.11.
MySQL has been installed on windows XP using a download of
mysql-5.0.13-rc-win32.zip. Test.php reports
[snip]
I have searched the mysql website and located an article which shows
reference
to this error indicating that the client may need to be upgraded but as I am
using the mysql-5.0.13-rc-win32.zip package I am cautious about assuming
that
that is the actual cause.
[/snip]
On Wednesday 26 October 2005 08:35, the author Jay Blanchard contributed to
the dialogue on-
RE: [PHP] MySql connection error on win XP for script that works on Freebsd
5.3:
[snip]
I have searched the mysql website and located an article which shows
reference
to this error indicating
I have a position open for someone in Johannesburg South Africa with
the following skills.
php
mysql
css
xml
xhtml
Image and artwork a bonus (ImageReady,Photoshop, Paintshop, The gimp)
Flash a bonus
Please email me directly at [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net
hi...
can anybody point me to a good/basic tutorial (tested) for php/mysql date
functions... basically, i want to store a date/time in a column, and be able
to read it, manipulate it, and update the table. i've seen various
articles/sample code, but i'm looking for something that i cna pretty
-Original Message-
From: bruce [mailto:[EMAIL PROTECTED]
Sent: Monday, September 26, 2005 11:12 AM
To: php-general@lists.php.net
Subject: [PHP] mysql/php date functions..
hi...
can anybody point me to a good/basic tutorial (tested) for
php/mysql date
functions... basically
Jim Moseby wrote:
Hi Bruce!
MySQL and PHP both have extensive built-in date functions that are clearly
documented and extraordinarily easy to use. For the vast majority of
situations, there is no need to manually write any custom date-handling
code. The decision to use MySQL or PHP to
-Original Message-
From: Silvio Porcellana [mailto:[EMAIL PROTECTED]
Sent: Monday, September 26, 2005 8:51 AM
To: php-general@lists.php.net
Subject: Re: [PHP] mysql/php date functions..
Jim Moseby wrote:
Hi Bruce!
MySQL and PHP both have extensive built-in date functions that are clearly
bruce wrote:
how can i create a mysql sql statement to insert a php 'time()' into mysql?
i've got the mysql var 't1, timestamp' but i can't figure out how to do an
insert
$q = time();
$sql = sprintf(insert into foo (id, ctime) values(%d, %???), $id, $q);
can't figure out how to get this to
), it doesn't work...
if i
-- insert into foo (id, time) values (2, NOW()), it works!!...
my question is why???
-bruce
-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED]
Sent: Monday, September 26, 2005 11:00 AM
To: php-general@lists.php.net
Subject: Re: [PHP] mysql/php date
, September 26, 2005 11:00 AM
To: php-general@lists.php.net
Subject: Re: [PHP] mysql/php date functions..
bruce wrote:
how can i create a mysql sql statement to insert a php 'time()' into
mysql?
i've got the mysql var 't1, timestamp' but i can't figure out how to do an
insert
$q = time
bruce mailto:[EMAIL PROTECTED]
on Monday, September 26, 2005 11:13 AM said:
i'm concerned that i can't seem to craft/create a basic sql cmd
within mysql to get a value (other than NOW()) to work...
[snip]
my question is why???
MySQL timestamps are different from UNIX timestamps.
Chris.
bruce wrote:
thanks...
but that's not it john... i'm not worried about creating the sql_statement
in the php...
i'm concerned that i can't seem to craft/create a basic sql cmd within mysql
to get a value (other than NOW()) to work...
if i do (from mysql)
-- insert into foo (id, time) values
but that still doesn't explain why i can't slam some value directly into the
timestamp var within the mysql tbl...
-Original Message-
From: Chris W. Parker [mailto:[EMAIL PROTECTED]
Sent: Monday, September 26, 2005 11:15 AM
To: php-general@lists.php.net
Subject: RE: [PHP] mysql/php date
-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED]
Sent: Monday, September 26, 2005 11:19 AM
To: php-general@lists.php.net
Subject: Re: [PHP] mysql/php date functions..
bruce wrote:
thanks...
but that's not it john... i'm not worried about creating the sql_statement
bruce wrote:
john...
that appears to be it!! although i would have assumes it would have done a
most significant bit fill with 0's...
so my question also comes down to .. do i use the php date functions for
date/time manipulation.. or do i use the mysql functions
any
-Original Message-
From: bruce [mailto:[EMAIL PROTECTED]
Sent: Monday, September 26, 2005 2:46 PM
To: 'John Nichel'; php-general@lists.php.net
Subject: RE: [PHP] mysql/php date functions..
john...
that appears to be it!! although i would have assumes it
would have done
Nichel [mailto:[EMAIL PROTECTED]
Sent: Monday, September 26, 2005 11:48 AM
To: php-general@lists.php.net
Subject: Re: [PHP] mysql/php date functions..
bruce wrote:
john...
that appears to be it!! although i would have assumes it would have done a
most significant bit fill with 0's...
so my
bruce
-Original Message-
From: bruce [mailto:[EMAIL PROTECTED]
Sent: Monday, September 26, 2005 12:38 PM
To: 'John Nichel'; php-general@lists.php.net
Subject: RE: [PHP] mysql/php date functions..
so you play with the time/date vars on the php side, and then simply store
them in the mysql tbl
bruce wrote:
or.. better yet.
if i do a php - time(), i get a unix_timestamp var. how do you guys store
this in mysql. you can't simply do an insert into a mysql/timestamp var. so
how do you convert it?
I don't convert it. I store the UNIX timestamp in an INT(11) column.
also, once you
John Nichel mailto:[EMAIL PROTECTED]
on Monday, September 26, 2005 12:43 PM said:
I don't convert it. I store the UNIX timestamp in an INT(11) column.
This is going to be a basic question I'm sure but why INT and not
VARCHAR? Is it simply because a timestamp is a number?
Chris.
--
PHP
- the php var?
thanks
bruce
-Original Message-
From: bruce [mailto:[EMAIL PROTECTED]
Sent: Monday, September 26, 2005 12:38 PM
To: 'John Nichel'; php-general@lists.php.net
Subject: RE: [PHP] mysql/php date functions..
so you play with the time/date vars on the php side, and then simply
Chris W. Parker wrote:
John Nichel mailto:[EMAIL PROTECTED]
on Monday, September 26, 2005 12:43 PM said:
I don't convert it. I store the UNIX timestamp in an INT(11) column.
This is going to be a basic question I'm sure but why INT and not
VARCHAR? Is it simply because a timestamp is
]
Sent: 26 September 2005 19:46
To: 'John Nichel'; php-general@lists.php.net
Subject: RE: [PHP] mysql/php date functions..
john...
that appears to be it!! although i would have assumes it would have done a
most significant bit fill with 0's...
so my question also comes down to .. do i use the php
Hello Bruce,
While the date functions are well documented - http://php.net/date - here is a
little example to manipulate the date with php, rather than mysql:
// set the new expiry date
// DATE FUNCTIONS FOR THE EXPIRY MODULE
// first perform date arithmetic
$listingExpiry = mktime
. The specific distribution is
CentOS 4.1. My computer is a pentium 3 with 512 MB Ram.
On the web hosting service where my web sites are hosted, they have the
following versions of PHP, MySQL and phpMyAdmin:
PHP Version 4.3.8
MySQL 4.1.3-beta-standard
phpMyAdmin 2.5.7-pl1
What I would like to do
Linux on my home computer. The specific distribution is
CentOS 4.1. My computer is a pentium 3 with 512 MB Ram.
On the web hosting service where my web sites are hosted, they have the
following versions of PHP, MySQL and phpMyAdmin:
PHP Version 4.3.8
MySQL 4.1.3-beta-standard
phpMyAdmin 2.5.7-pl1
Thank you for your helpful assistance in explaining the situation to me.
It would seem from the advice I've been given that I don't need to worry
about compatibility when it comes to application versions.
But I do have a follow up question. Are there any specifications or
installation options
On Sep 19, 2005, at 8:31 AM, Jochem Maas wrote:
e.g:
$var = array_pop( explode('-', '1-2-3-4-5') );
.. is bad code (read the manual page for array_pop very carefully)
and would work
in older versions but the engine has been tightened up to disallow
such fauxpas.
Jochem,
Whoa...
Jordan Miller wrote:
On Sep 19, 2005, at 8:31 AM, Jochem Maas wrote:
e.g:
$var = array_pop( explode('-', '1-2-3-4-5') );
.. is bad code (read the manual page for array_pop very carefully)
and would work
in older versions but the engine has been tightened up to disallow
such fauxpas.
That is very interesting, thank you. We cannot escape politics, eh?
Jordan
On Sep 19, 2005, at 9:32 AM, Jochem Maas wrote:
Jordan Miller wrote:
On Sep 19, 2005, at 8:31 AM, Jochem Maas wrote:
e.g:
$var = array_pop( explode('-', '1-2-3-4-5') );
.. is bad code (read the manual page for
Hi,
i have a form for the user input with checkboxes and table rows for the user.
The user can select the checkboxes which correspond to table rows in database.
Depending on the selection of checkboxes i want to update the fields. For
example:
for
that month and insert the rows where they don't already exist.
I wait they understand me what I want:
I work php/mysql.
create table tableA (
day int,
month int
);
select * from tableA where month=5 and day 19;
This will select everything from the 5th month and before the 19th day
Jasper Bryant-Greene schrieb:
Oliver Grätz wrote:
3. Yes. One can abuse exceptions to return something in a constructor.
Just another argument against exceptions ;-) OK, it's unorthodox,
if you absolutely need to do that, do it and tell nobody *g*.
This is not abusing exceptions. If
hi...
i have the following psuedo code...
i'm showing the pertinent parts, and eliminating the rest...
--
class sql
{
function sql(...)
{
return false
mysql_
mysql_
}
}
$db = new sql(...)
echo db = .$db;
On Wednesday 14 September 2005 03:42 pm, bruce wrote:
hi...
i have the following psuedo code...
i'm showing the pertinent parts, and eliminating the rest...
--
class sql
{
function sql(...)
{
return false
mysql_
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 14, 2005 1:51 PM
To: php-general@lists.php.net
Subject: Re: [PHP] php/mysql object id question..
On Wednesday 14 September 2005 03:42 pm, bruce wrote:
hi...
i have the following psuedo code...
i'm showing the pertinent parts
bruce wrote:
stephen,
you're correct regarding what's going on... i had taken some code used in
phpBB, and blindly slammed it into my app to test out their db class... i
had assumed that it worked
guess what!!!
in their constructor, they have the 'return false' arrggghh!!! a quick look
at
bruce wrote:
in their constructor, they have the 'return false' arrggghh!!! a quick look
at google, and it appears that you can't return any val from a constructor.
in fact, the 'object id' that's being returned appears to simply be (as you
stated) the instance of the class that was created...
Vermillion [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 14, 2005 2:46 PM
To: [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Subject: Re: [PHP] php/mysql object id question..
bruce wrote:
stephen,
you're correct regarding what's going on... i had taken some code used in
phpBB
to insert together with the one selected,
I wait they understand me what I want:
I work php/mysql.
sorry for my english i'm cuban
Thank you and excuse the nuisances
--
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos peligrosos,
y se considera que está limpio
bruce schrieb:
but then, i'm starting to realize that there's probably a great deal of
'opensource' code that's in use that hasn't been thoroughly vetted.
1. Constructors cannot explicitly return anything because
they always return the new object.
2. OpenSource project and the code in them:
Oliver Grätz wrote:
3. Yes. One can abuse exceptions to return something in a constructor.
Just another argument against exceptions ;-) OK, it's unorthodox,
if you absolutely need to do that, do it and tell nobody *g*.
This is not abusing exceptions. If you throw an exception then the
inserted in the table in the
same month, in case that there are not them then they owe you
to insert together with the one selected,
I wait they understand me what I want:
I work php/mysql.
create table tableA (
day int,
month int
);
select * from tableA where month=5 and day 19
hi...
if an app has a webpage that has to interface/display data from a mysql db,
does the app have to essentially do a new db_connection for each time that a
user accesses the page during the session.
as far as i can tell, it does.
in other words, the page would need to look something like:
901 - 1000 of 3625 matches
Mail list logo