How do I add IFNULL to the LEFT JOIN query? I either want the result
from the database or a 0 instead of the word NULL
Ron
SELECT `store_product_profile`.`reference` , inventory.inventory,
sold_1.quantity, sold_2.quantity, sold_3.quantity
FROM `store_product_profile`
LEFT JOIN (
SELECT
, not if it was in several previous purchases.
Any help is appreciated.
Ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
and Christmas). It is quite the
query to say the least.
Thanks for your help.
Sincerely,
Ron
www.TheVerseOfTheDay.info
ron.pigg...@actsministries.org wrote:
The query from my previous post was only part of a larger query. This
is
the entire query:
SELECT GREATEST( IF( CURDATE( ) = DATE_SUB( DATE
Does anyone see anything wrong with this query? Do I have one of the , =
or mixed up? The purpose is to figure out if it is within 14 days of
Christmas AND if there is content for Christmas available. 2 is symbolic
in the database being Christmas. Ron
IF( CURDATE( ) = DATE_SUB( DATE(2009-12
) , INTERVAL LEAST( 14, (
SELE' at line 1
Any help out there please?
Ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I am getting the following error message:
#1054 - Unknown column 'customers.email' in 'order clause'
from the query below --- I don't understand why. Would someone help me
please? Ron
SELECT 'first_name', 'last_name', 'email'
FROM (
(
SELECT `firstname` , `lastname` , `buyer_email`
FROM
I found the problem. The first subquery needed AS aliases. I am
learning more of what mySQL is capable of and appreciate the help. Ron
-Original Message-
From: TG tg-...@gryffyndevelopment.com
To: ron.pigg...@actsministries.org
Subject: Re: [PHP-DB] mySQL query syntax error
Date: Sat
How do I test if an UPDATE query worked
$query = UPDATE `clients` SET `company` = '$company', `contact` =
'$contact', `phone` = '$phone', `city` = '$city' WHERE
`clients`.`reference` =$client LIMIT 1;
$client_result=mysql_query($query);
???
Ron
'%
$search_string%' AND `product_description` LIKE '%$search_string%' AND
`keywords` LIKE '%$search_string%'
Ron
this to the 3 fields in the data I want to
search with the users search string ( product_name ,
product_description , keywords ) The search string in the form is
search_string
Could someone show me how to make this work with what I have described
please?
Ron
-Original Message-
From: Ron Piggott
in the product_name field a few times. Any idea what
I have done wrong / or why this is happening? Ron
SELECT MATCH (
`product_name` , `product_description` , `keywords`
)
AGAINST (
'postcard'
) AS Relevance
FROM store_product_profile
WHERE MATCH (
`product_name` , `product_description` , `keywords`
)
AGAINST
\n;
echo liTo Overseas: Up To Six Weeks ($six_weeks)/li\r\n;
echo /ul\r\n;
===
Does anyone have a suggestion for me? Should I be putting the store
policies into their own files instead of using the database and the eval
command? How have you approached similar situations?
Ron
(YEAR(CURDATE()), '-12-25'), INTERVAL
LEAST(14, (SELECT COUNT(*) FROM `verse_of_the_day_Bible_verses` WHERE
seasonal_use = 2)) DAY) AND CURDATE() = YEAR(CURDATE()), '-12-25'), 2,
0) ) AS verse_application
On Thu, 2009-09-24 at 15:39 +1000, Chris wrote:
Ron Piggott wrote:
Let me try
?
Ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
How would I put a space after each letter:
echo str_shuffle(stripslashes(mysql_result($word_result,0,word));
Ron
I am wondering if I can put PHP into a mySQL table.
When I tried doing:
echo stripslashes(mysql_result($article_titles_result,0,article));
The PHP coding displays, not rendered PHP.
Any suggestions?
Ron
of cartoons.reference. How do I be more
specific with the AVG so I will get a rating for each cartoon in the table?
Ron
to the rating field?
Ron
Thanks
- Original Message -
From: Waynn Lue waynn...@gmail.com
To: Ron Piggott ron@actsministries.org; php-db@lists.php.net
Sent: Saturday, September 05, 2009 4:45 PM
Subject: Re: [PHP-DB] UPDATE instead of INSERT INTO
INSERT INTO ON DUPLICATE KEY UPDATE is what you're looking
...@gmail.com
To: Chris dmag...@gmail.com
Cc: Ron Piggott ron.pigg...@actsministries.org; php-db@lists.php.net
Sent: Monday, August 17, 2009 6:00 AM
Subject: Re: [PHP-DB] GROUP BY
ASC after GROUP BY ?? didn't mysql throw an error
* FROM `member_subscriptions` WHERE `list` =1 AND `email_delivery_hour`
=6 GROUP BY `email_delivery_hour` ASC ORDER BY `email_delivery_hour` ASC LIMIT
1
Ron
I am needing help changing this code so the result of the mySQL query will
display in two columns with the CSS tags around it. The number of records
being displayed is based on the mySQL query and will increase as more poetry is
added to the site.
echo div
Is there a way to do the math in a DELETE statement (All 1 step; See my
sample below pseudo code below). I am trying to delete the record if it is
more than 3 hours old and the value of approved is still 0.
DELETE FROM `guest_book` WHERE `guest_book`.`date_submitted` + 3 hours =
Is there a way to do the math in a DELETE statement (All 1 step; See my
sample below pseudo code below). I am trying to delete the record if it is
more than 3 hours old and the value of approved is still 0.
DELETE FROM `guest_book` WHERE `guest_book`.`date_submitted` + 3 hours =
Hi All,
I have a form where in a user will enter a time and choose a timezone.
based on those, i need to insert to db the time as the actual time on
their timezone. how can i compute that on php? is it possible?
hope i'm not confusing. tnx
regards
Ron
--
PHP Database Mailing List (http
thanks to all your reply. i will check on both
Yannick Mortier wrote:
2009/2/4 Ron r...@silverbackasp.com:
Hi All,
I'm creating a billing system wherein a user can view invoices. and if the
user wants to print it a click on a button will generate a pdf file of their
invoice. pdf or any other
Hi All,
I'm creating a billing system wherein a user can view invoices. and if
the user wants to print it a click on a button will generate a pdf file
of their invoice. pdf or any other printable format will do.
TIA
Regards
Ron
--
PHP Database Mailing List (http://www.php.net
ones such as:
input type=text name=first_name id=first_name size=20
maxlength=40 /
Thanks, Ron
')));
$expiredate = date(Y-m-d,mktime(0,0,0,date('m'),date('d'),date('Y')) +
2592000); the 2592000 timestamp for 1 month.
how can i compute the timestamp for 6 months or maybe 1 year or more.
Thank you
Regards,
Ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
Thanks i will try strtotime.
Phpster wrote:
$endDate = date('Y-m-d', strtotime(+6 months);
Should be close
Bastien
Sent from my iPod
On Dec 30, 2008, at 8:43 PM, Ron r...@silverbackasp.com wrote:
Hi,
I'm trying to do online subscription on my site.
I need to determine
. ' ) ;
How do I do this correctly?
Ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
One more thing ... Bible is stored by verses, t is the text of the verse
On Sun, 2008-12-21 at 19:52 -0500, Ron Piggott wrote:
I am working on a web based Bible searching query. So far I am able to
generate:
SELECT * FROM `bible_verses` INNER JOIN `bible_books` ON
`bible_books`.`id
.
For example I may be trying to get the value of description_french
I am trying to use the variable instead of having several mysql_result
lines
Ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
am wondering how my PHP script may access the value of value of
$_POST['submit']. At present echo $_POST['submit']; doesn't give me a
value. Consequently all queries to the mySQL database fail.
Ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
first and file name second.
Thanks for your input.
Ron
On Thu, 2008-11-13 at 15:30 +1100, Chris wrote:
Ron Piggott wrote:
This doesn't take into account the page - o - mation though.
The query that determines which up to 18 images display on the
thumbnails page is:
SELECT * FROM
are being displayed.
I am wondering if I should be doing this WHILE loop, to scan the up to
18 images.
So far my results only incorporate the first image being displayed.
Any suggestions?
Ron
$page_link=1;
$ii=0;
$last_update = -00-00;
while ($ii $number_of_images
map to match what is being displayed on the thumbnails page.
Ron
On Thu, 2008-11-13 at 14:28 +1100, Chris wrote:
Ron Piggott wrote:
I need help with a site map I am making using PHP. The site map is of an
online photo gallery.
In the code below I am trying to determine the lastmod value
I am writing a blog application.
Table blog has the blog entries
Table blog_owners is the user profiles
Table blog_responses is responses to the blog entries
I am writing the module where the user approves or deletes user comments
when the blog entry is in 'moderated' mode.
I am trying to find
to 10 of the total
results. user chose 3 option on page 1, 3 option on page 2, 2 on page 3
and 2 on page 4. how can i get the values from page 1 2 and 3 so i cn
insert it on the database?
Hope i am not confusing. TIA
Regards,
Ron
--
PHP Database Mailing List (http://www.php.net
in the community blog I am creating. How can I make my own
greeting, instead of displaying the error mySQL is giving me?
Ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
,anagram);
I need help adding br's so each word will be on a new line. Within
the table column each word is on a separate line. It would also be
really cool if the first letter was in bold (ie bX/b )
echo stripslashes($anagram)
Thanks,
Ron
--
PHP Database Mailing List (http://www.php.net
Is there a way to make this part of a SELECT query more concise?
AND ministry_directory.listing_approved NOT LIKE '0' AND
ministry_directory.listing_approved NOT LIKE '4'
I know of the
IN ( 10, 12 )
command. Is there something similar available for NOT LIKE?
Ron
--
PHP Database Mailing
session
on the db, would it prevent the session variable to get lost when a user
1 brose from server 1 o server 2 or vice versa?
thank you
regards,
ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
is displayed.
Ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Sir,
Is it possible to upload directly on a remote server using php file upload?
so that i will have everything on the remote server instead of in the local
server?
regards,
ron
On Sat, 5 Jul 2008 10:55:48 -0400, Bastien Koert wrote
On Fri, Jul 4, 2008 at 11:35 PM, Ron [EMAIL PROTECTED
it will
also be transferred on the other server?
can i use php to execute the rsync command, and transfer the uploaded
file to the other server? or are there other ways to transfer? thank you
regards,
ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http
»¿shopping_cart_product(product_name,
product_description)' at line 1
My table is named: shopping_cart_product
I have columns:
product_name varchar(50)
product_description longtext
Ron
On Thu, 2008-05-29 at 12:48 +1000, Chris wrote:
Ron Piggott wrote:
I am getting the following error
( 'product_description_search') AGAINST ( 'Jesus') FROM
shopping_cart_product
Thanks, Ron
On Fri, 2008-05-30 at 21:58 -0400, Bastien Koert wrote:
On 5/30/08, Ron Piggott [EMAIL PROTECTED] wrote:
I don't understand what is going wrong:
CREATE FULLTEXT INDEX
, )
The weakness is the trailing , after the last word the user types in.
How can I eliminate this?
Ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I am not sure why this isn't bringing any results:
WHERE shopping_cart_product.product_description IN ('straying')
The word straying is in the midst of one of the descriptions.
Ron
On Wed, 2008-05-28 at 20:13 -0400, Ron Piggott wrote:
I am trying to add a search feature to my shopping cart
Someone referred me to:
http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html
Does this look like I am on the right track?
Ron
SELECT MATCH(shopping_cart_product.product_description,
shopping_cart_product.product_name) AGAINST ('$keyword') as Relevance
FROM ( shopping_cart_category
I am getting the following error when running the query through php my
admin:
MySQL said: Documentation
#1191 - Can't find FULLTEXT index matching the column list
I am new to this; Thank you for the help.
Ron
On Wed, 2008-05-28 at 22:01 -0400, Ron Piggott wrote:
Someone referred me
)
If shopping_cart_sales_shipping_address.same_as_customer has a value of
0 I need to
INNER JOIN shopping_cart_sales_billing_address WHERE
shopping_cart_sales_billing_address.shipping_address_reference =
shopping_cart_sales_shipping_address.reference
otherwise the shipping address is the same as the billing address.
Suggestions?
Ron
shopping_cart_sales_shipping_address.same_as_customer = '0' THEN INNER
JOIN shopping_cart_sales_billing_address ON
shopping_cart_sales_billing_address.shipping_address_reference =
shopping_cart_sales_shipping_address.reference
On Sat, 2008-05-24 at 19:40 -0400, Bastien Koert wrote:
On 5/24/08, Ron
I have figured it out. When I first started I was trying to do too much
in one command; when I broke it down into sections I figured it out. Ron
Ron
On Wed, 2008-05-14 at 23:17 -0400, Ron Piggott wrote:
I have just made a change that I realize is going to be necessary for
the shipping logic
that needs to ship in an envelope. I want the logic
behind this to optimize packaging shipping and handling costs and for
the order created to indicate to me which type of packaging I should use
that will hold all items ordered.
Thanks for helping me. Ron
mysql_connect('localhost',$username,$password
)
packaging_type int(1)
packaging_image_filename varchar(40)
package_length decimal(3,1)
package_width decimal(3,1)
package_height decimal(3,1)
packaging_cost_to_ship_canada decimal(3,2)
packaging_cost_to_ship_us decimal(3,2)
packaging_cost_to_ship_international decimal(3,2)
On Wed, 2008-05-14 at 23:12 -0400, Ron
what products have left
so I don't sell something I don't have.
Ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
If I wasn't clear I am trying to figure out how to save an array in a
mySQL table, both the array and it's value ... in this instance the
product reference and the quantity the customer has decided on. Ron
On Tue, 2008-05-13 at 23:11 -0400, Ron Piggott wrote:
I am writing a shopping cart. I am
How do I inner join 3 tables together? What would the syntax look like
for this situation:
Table 1 and table 2 have a common field;
Table 2 and table 3 have a common field
Ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I am writing a shopping cart. I wanted some input on session handling
for a shopping cart that is secure.
At this time I am not programming for credit card processing. I am
going to forward onto PayPal for payment initially. But I want to do a
good job with security.
Ron
--
PHP Database
In the PHP script below I need to be able to pass on the value of
'reference' within the shopping_cart_product table when the Delete
Category and Rename Category buttons are clicked. How do I do this?
Ron
mysql_connect('localhost',$username,$password);
@mysql_select_db($database) or die
.
The 6 requests are correct.
Any ideas why I have 2 different search results?
Ron
SELECT * FROM ministry_directory INNER JOIN
ministry_directory_listing_categories ON ministry_directory.entry =
ministry_directory_listing_categories.ministry_directory_entry WHERE
ministry_directory.listing_type = 2
You just drew my attention my include that brings in the site menu and
was changing the conflict. Thanks :) Ron
On Thu, 2008-05-01 at 13:19 +1000, Chris wrote:
Ron Piggott wrote:
I have an interesting question.
When I run the following query through my PHP script it produces 1
result
hi yves,
not sure how large the file is, but i'm assuming a caller would not
leave a voicemail longer than a minute. max maybe 30 secs. is there a
query to get the size of a data in a certain row/column?
thank you
regards
ron
Yves Sucaet wrote:
So how large is the file/BLOB? How many
Hi,
How can i retrieve via php a media stored in a mysql database as longblob?
I'd like to be able to retrieve the media and stream it.
TIA
regards,
ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
of media are you trying to retrieve? Are you trying to
retrieve the MySQL data and stream that through your script to the
client? How big is the BLOB?
If nothing else, you'll need to adapt the MIME-type in the header of
your HTTP-message.
HTH,
Yves
- Original Message - From: Ron
What is the correct syntax for where the results may be 1 or 2? What
have I done wrong?
SELECT * FROM table WHERE name LIKE ABC AND listing_type = 1 or 2
???
Ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
the form select 2 of the 10 possible categories 2 records
were created.)
Is there a different way to word my query so I will be able to retrieve
the record with two rows in table ministry_directory_listing_categories
and 1 row in ministry_directory ?
Thanks for the help guys.
Ron
--
PHP Database
Two different rows Chris.
reference ministry_directory_entry ministry_directory_category_reference
13 1 10
14 1 11
What I am trying to do is allow the user to make a more specific search.
Ron
On Mon, 2008-03-10 at 10:37 +1100, Chris wrote
=
mdlc.ministry_directory_entry
WHERE md.listing_type = 2
AND mdlc.ministry_directory_category_reference IN (10, 11)
ORDER BY ministry_directory.name ASC
Regards,
Bruce
Ron Piggott [EMAIL PROTECTED] 10/03/2008 10:33:13 a.m.
I am wondering what is wrong with this syntax?
SELECT * FROM
Is it possible to do a case sensitive query to mySQL? What would an
example syntax look like? Ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
= mysql_result($search_result,$i,description);
Ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
. I am
back in the learning curve with this syntax.
Thanks,
Ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I was thinking more after I sent the post. I would like to retrieve the
results into an array, if it is possible. Does this make sense? What I
am wanting to display are the dollar values for the rate plans. Thanks
for the help. Ron
--
PHP Database Mailing List (http://www.php.net
.
Ron
On Sat, 2007-12-15 at 19:58 -0800, Micah Stevens wrote:
If I make a test table with a field that is DECIMAL(4,2), I can:
INSERT INTO `testaa` ( `a` )
VALUES (
'8.00'
)
Then I can
SELECT * FROM `testaa`
I get '8.00' from the 'a' field.
It looks like you're using
How do I get the decimal point back when I am retrieving from a column
that is set up as:
rate decimal(4,2)
Example: Right now it is giving me 800 instead of 8.00
Ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
INSERT INTO rate_plans VALUES ( '12', 'One Week', '1', '2', '2',
'8.00' )
When I use
$advertisement_rate = mysql_result($rate_plan_result,0,rate);
$advertisement_rate has a value of 800 instead of 8.00 --- how can I get
my 2 decimal places back?
Ron
On Sat, 2007-12-15 at 18:18 -0800, Micah
advertisements.
I am on the http://dev.mysql.com/doc/refman/5.0/en/update.html page and
I am missing something.
Ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thanks
Ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
concern is that if I don't find all the instances I will have errors on
my site ... this is extensive to correct.
Suggestions?
Ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Can you inner join 3 tables together? Do you know what the syntax would be?
Ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thanks guys. That is really cool ... 3 tables all working together. Ron
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
received that isn't automatically index is dispayed through this
form, one TR per message, thanks for your help. Ron
trtd width=200
font face=times new roman
center
input id=all type=checkbox name=correspondence_reference value=172
checked 172
/center
/tdtd width=200
font face=times new roman
replies to my e-mail as
well as to the list. Ron
[EMAIL PROTECTED]
www.actsministrieschristianevangelism.org
Acts Ministries Christian Evangelism
Where People Matter
12 Burton Street
Belleville, Ontario, Canada K8P 1E6
In Belleville Phone : (613) 967-0032
In North America Call Toll Free
39
where
$new_maintainers_notes = Listing has been set for it's annual review;
But when I return it from the web --- ie http://www... no
error.
Any idea why the cron is upset?
Ron
generate the SELECT syntax for the search
results Could Include a given category and Must Include a given
category based on what the user has inputted through this form?
Ron
back to 1 because of this. Am
I making sense? I am trying to get ready for a marketing campaign for a
home based business I have started so I may eventually quit my day job
do when I have a passion for (caring for people.)
Ron
On Tue, 2007-04-17 at 08:20 -0400, Michael Keyser wrote:
You could
Does anyone see anything wrong with the $query syntax? Ron
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( Unable to select database);
$query=ALTER TABLE sessions auto_increment = '1';
mysql_query($query);
mysql_close();
Is there a way to find out what dates Easter will be in PHP for 2008,
2009, etc.? Ron
I did say 'geeky' ... and I have seen amazing stuff on this list of
programmers helping each other ... Ron
On Fri, 2007-04-06 at 20:46 -0400, Stephen Smith wrote:
Hmmm not sure that is really possible without using the gregarian calendar
or whatever it is called. Easter is always the first
Found a PHP function ... thanks for the help. Ron
easter_date($current_year)
On Fri, 2007-04-06 at 20:46 -0400, Stephen Smith wrote:
Hmmm not sure that is really possible without using the gregarian calendar
or whatever it is called. Easter is always the first sunday after the first
full
Would someone help me with this ---
How do I get the results for 2 days before Easter Sunday from this ---
what do I have to do to my date statement to figure out Good Friday?
$good_Friday = date(Y-m-d, easter_date($current_year));
\, $somepath, $somefilename);
in your php line: echo img src=.$row['photoFileName']. alt='photo';
the line echoed doesn't have any quotes in it.
Ron
elk dolk wrote:
Hi all,
I am new to web programming.
I have code to add pictures to a MYSQL database. Now I can't seem to figure
out how
a ' into a '' or a into a works too, but the mysql
function for that works better safer etc.
Ron
Stephen Smith wrote:
OK guys, here is my delima, which is probably very easy to solve, but I can't
seem to find it. I am trying to get form fields to accept apostrophes within
the input and stop crashing
Hello all,
Is there a discussion list for MySQL queries (I have a rookie MySQL
query question and don't want to bug this list with it)
Ron
--
=
It's is not, it isn't ain't, and it's it's, not its, if you mean
it is. If you don't
don't have to have the commands in the
PHP script that processes the form twice by including the OR
$_POST['submit'] == Update Entire Account )
Ron
I have a $subscription_begins variable. It the date type. -MM-DD
How may I find out the month value (1 to 12) of this variable?
Ron
Actually I did and that worked,
someone suggested that earlier in the thread
thanks for responding, I appreciate it
Ron
Micah Stevens wrote:
Did you restart MySQL?
On 03/16/2007 02:22 PM, Ron Croonenberg wrote:
Hi quick question (off topic a bit)
MySQL seems to be not running on DST
Hi quick question (off topic a bit)
MySQL seems to be not running on DST while the machine it is on is.
any ideas ?
if I use a mysql_query(select now(), connection); it looks like it is
an hour earlier then the system time.
Ron
101 - 200 of 372 matches
Mail list logo