Re: [PHP-DB] Prevention for multiple submissions from the same form

2007-10-05 Thread OKi98
T K napsal(a): I've learned that this is possible to make and send a unique id in hidden input, and check if the id is used before database query is issued. (PHP Cookbook [O'reilly]). Why? You should always ensure that only unique data are inserted into database. This is not just about multiple

Re: [PHP-DB] Prevention for multiple submissions from the same form

2007-10-05 Thread TG
But what if the data being inserted isn't unique? What if it's a voting form that says Do you like pie? Yes/No? True, it could record the response and the userid or IP address so that would be a unique pairing but what if the vote was anonymous and you allowed multiple people from the

[PHP-DB] Query executing

2007-10-05 Thread ron.php
How would I know if this mySQL query: DELETE FROM `table` WHERE `date_to_be_deleted` LIKE '$todays_date' actually deleted any rows from the table? Ron

RE: [PHP-DB] Query executing

2007-10-05 Thread Hutchins, Richard
The mysql_affected_rows() function will tell you how many rows were affected by the DELETE query you just fired. You can also test for TRUE or FALSE on the mysql_query() function if you just want to know if the query was successful or not. Rich -Original Message- From: ron.php

[PHP-DB] Making labels

2007-10-05 Thread Ron Piggott
Has anyone using a mySQL table to make labels?  Where would you get started?  I have a table that has a name field and then 5 address lines.  I would like to take this and format it for an avery 5160 label --- that kind of labels that are 3 columns x 10 labels.  Thoughts?  Please send any

RE: [PHP-DB] Making labels

2007-10-05 Thread Bastien Koert
Hey Ron, You should be able to do it. Do the query for the data and then output the data in to tables that roughly match the size of the labels. The hard part will be to match the tables to labels. Start by making the main table 750px wide, since that seems to about the width of the page.

[PHP-DB] Re: Query executing

2007-10-05 Thread Thomas Tschernich
How would I know if this mySQL query: DELETE FROM `table` WHERE `date_to_be_deleted` LIKE '$todays_date' actually deleted any rows from the table? www.php.net/mysql_affected_rows Greetings, Thomas Tschernich -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP-DB] pdo::mysql and unbuffered queries

2007-10-05 Thread Thomas Tschernich
Hello there, I tried using pdo (www.php.net/pdo) as it would be nice for my projects to be portable to another database systems, but quickly ran into problems. The lesser important: One time, there was a simple typo in one of my queries and I got an error that php is not able to save session