Re: [PHP-DB] Are join queries in phpMyAdmin a security hazard?

2010-02-28 Thread TG
The only issue I see and maybe why they'd disable it is so you don't do a crazy join that ends up returning 8 billion rows. But they should be able to manage that with query execution time timeouts or something and you can do the same thing with bad implied inner joins in the WHERE clause

Re: [PHP-DB] How to: Include identifier with a query

2009-11-02 Thread TG
if that helps, but just to add to the list of how *some* people do it. Good luck! -TG - Original Message - From: listread listr...@cze.com To: php-db@lists.php.net Date: Mon, 02 Nov 2009 07:16:23 -0600 Subject: [PHP-DB] How to: Include identifier with a query Greetings! We are searching

Re: [PHP-DB] recover values independently of GET or POST used

2009-09-14 Thread TG
good to try to structure things so you have a predictable and controllable way so you know whether you're going to be getting GET or POST data. Some cases required 'either' but in general, one or the other should be good enough if your code is structured properly. -TG - Original Message

Re: [PHP-DB] is there any reasone why the following doesn't work?

2008-12-25 Thread TG
of the script execution isn't a big deal. But you won't be able to pass the connection information via session variables. -TG - Original Message - From: Fred Silsbee fredsils...@yahoo.com To: php-db@lists.php.net Date: Thu, 25 Dec 2008 15:57:13 -0800 (PST) Subject: [PHP-DB] is there any

Re: [PHP-DB] Joomla MySQL query performance affected by anything non-server related?

2008-11-09 Thread TG
their database guys who don't want to work. -TG - Original Message - From: Fergus Gibson [EMAIL PROTECTED] To: php-db@lists.php.net Date: Sun, 9 Nov 2008 11:09:22 -0800 Subject: Re: [PHP-DB] Joomla MySQL query performance affected by anything non-server related? On Wed, Nov 5, 2008 at 2:17 PM

[PHP-DB] Joomla MySQL query performance affected by anything non-server related?

2008-11-05 Thread TG
about optimization, but I need some solid evidence to throw at this web host so they'll listen to me. They're usually really awesome, but this case is causing me to lose my hair. Thanks in advance! -TG -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP-DB] Joomla MySQL query performance affected by anything non-server related?

2008-11-05 Thread TG
me nuts. They get traffic, but it shouldn't be so much that it's causing issues ilke this. Shouldn't have to make such radical changes for this site. All I can think is that it's an issue with their server and/or other customers on the same shared server. -TG - Original Message

Re: [PHP-DB] Joomla MySQL query performance affected by anything non-server related?

2008-11-05 Thread TG
- Original Message - From: Afan Pasalic [EMAIL PROTECTED] To: TG [EMAIL PROTECTED] Cc: php-db@lists.php.net Date: Wed, 05 Nov 2008 17:07:46 -0600 Subject: Re: [PHP-DB] Joomla MySQL query performance affected by anything non-server related? TG wrote: Been getting the occasional

Re: [PHP-DB] When does using multiple tables make sense?

2008-10-20 Thread TG
you're in a good position since your company is small. Probably can't do too much that's going to cause a mess in the future. hah Good luck! -TG - Original Message - From: Jason Pruim [EMAIL PROTECTED] To: php-db@lists.php.net Date: Mon, 20 Oct 2008 07:59:36 -0400 Subject: [PHP-DB

Re: [PHP-DB] SELECT query with multiple WHERE Clause

2008-02-27 Thread TG
server is on another server, if you have a Windows machine you can use a program like WinSQL Lite or Navicat to connection to the MySQL server (if it allows remote connections). phpMyAdmin is probably the easiest option though. -TG - Original Message - From: Nasreen Laghari [EMAIL

Re: [PHP-DB] Download google spreadsheet

2007-12-26 Thread TG
You might check the google documents api: http://code.google.com/apis/documents/overview.html -TG - Original Message - From: ioannes [EMAIL PROTECTED] To: php-db@lists.php.net Date: Wed, 26 Dec 2007 23:59:12 + Subject: [PHP-DB] Download google spreadsheet I would like to get

RE: [PHP-DB] UPDATE syntax

2007-12-13 Thread TG
-them are used to be explicit with a name. -TG - Original Message - From: Gary Wardell [EMAIL PROTECTED] To: php-db@lists.php.net Date: Thu, 13 Dec 2007 19:33:57 -0500 Subject: RE: [PHP-DB] UPDATE syntax Hi, I'm a beginner at PHP and MySql but a long time MS SQL server user. Maybe

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

2007-10-05 Thread TG
for allowing non-unique input into the database, depending on the circumstances. -TG - Original Message - From: OKi98 [EMAIL PROTECTED] To: T K [EMAIL PROTECTED] Cc: php-db@lists.php.net Date: Fri, 05 Oct 2007 10:34:50 +0200 Subject: Re: [PHP-DB] Prevention for multiple submissions from

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

2007-10-04 Thread TG
The most common method I've seen is with Javascript. onsubmit, disable submit button. As a backup, in case the user's JS is disabled, you might consider the unique ID thing. -TG - Original Message - From: T K [EMAIL PROTECTED] To: php-db@lists.php.net Date: Thu, 4 Oct 2007 20:09:01

[PHP-DB] Re: [PHP] the opposite of a join?

2007-10-03 Thread TG
WHERE DepartmentID IS NULL. -TG - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED], php-db@lists.php.net Date: Wed, 3 Oct 2007 05:21:06 -0500 Subject: [PHP] the opposite of a join? I have a company table and a contacts table. In the contacts table, there is a field

Re: [PHP-DB] newbie help

2007-09-29 Thread TG
. Always willing to learn new things if they are, indeed, better. -TG - Original Message - From: Bob Chatman [EMAIL PROTECTED] To: TG [EMAIL PROTECTED] Cc: nhadie [EMAIL PROTECTED], php-db@lists.php.net Date: Fri, 28 Sep 2007 23:23:41 -0700 Subject: Re: [PHP-DB] newbie help

Re: [PHP-DB] newbie help

2007-09-28 Thread TG
storing for your customers and your customer's customers? And what other data do you need to store for whatever your webapp does? -TG - Original Message - From: nhadie [EMAIL PROTECTED] To: php-db@lists.php.net Date: Fri, 28 Sep 2007 23:49:23 +0800 Subject: Re: [PHP-DB] newbie help

Re: [PHP-DB] Updating 2 Databases from a single form

2007-09-27 Thread TG
); Something like that. -TG - Original Message - From: Derek [EMAIL PROTECTED] To: php-db@lists.php.net Date: Thu, 27 Sep 2007 16:42:10 -0500 Subject: [PHP-DB] Updating 2 Databases from a single form Hello, I was wondering if there is anyway to first connect to two databases simeltaneously

Re: [PHP-DB] Delete one table and move data to another table

2007-09-26 Thread TG
and dirty example, not adhering to any real design scheme. My normal code is a bit prettier than this, but you get the idea. -TG - Original Message - From: endro mei a. [EMAIL PROTECTED] To: php-db@lists.php.net Date: Wed, 26 Sep 2007 17:26:04 +0700 Subject: [PHP-DB] Delete one table

Re: [PHP-DB] Re: mysql statement [SOLVED]

2007-09-26 Thread TG
= should (if I recall) be faster than LIKE comparisons. So if you really meant to use =, do that instead. Let me know if any of that's unclear. I know I get some kooky ideas sometimes. Also, anyone see anything I screwed up or have thoughts on this matter? Good luck! -TG - Original

Re: [PHP-DB] Query syntax

2007-09-15 Thread TG
%' AND listing_approved IN ('1', '2') ORDER BY name ASC Good luck! -TG - Original Message - From: ron.php [EMAIL PROTECTED] To: php-db@lists.php.net Date: Sat, 15 Sep 2007 15:04:59 -0400 Subject: [PHP-DB] Query syntax $query=SELECT * FROM table WHERE listing_type LIKE '%$listing_type

Re: [PHP-DB] First and Last ID of a table

2007-07-11 Thread tg-php
SELECT MIN(id), MAX(id) FROM mytable :) Hope that helps! -TG = = = Original message = = = I have a table where I need to figure out the very first ID and the very last ID, so here is what I wrote: $first_query = SELECT id FROM mytable ORDER BY id LIMIT 1; $first_result = mysql_query

Re: [PHP-DB] First and Last ID of a table

2007-07-11 Thread tg-php
= ld.LeadID (actually a lot of the time you can leave out the as and just do Leads l) Fun times.. -TG = = = Original message = = = [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] SELECT MIN(id), MAX(id) FROM mytable As an aside, is you are using associative arrays, be sure to use

Re: [PHP-DB] sql statement - complex order by

2007-07-02 Thread tg-php
/last, then put everyone else after the Bobs sorted by first/last. If you don't put DESC on the 'Cats', it looks like it'll put the 'Cats' at the bottom of the list. Also refer to the user comments here: http://dev.mysql.com/doc/refman/4.1/en/sorting-rows.html good luck! -TG = = = Original

Re: [PHP-DB] Search for whole words in MySQL 3.23

2007-06-13 Thread tg-php
or an underscore (_). mysql SELECT 'a word a' REGEXP '[[::]]word[[::]]'; - 1 mysql SELECT 'a xword a' REGEXP '[[::]]word[[::]]'; - 0 -TG = = = Original message = = = Hi all, I'm setting up a database search on a site, where I will essentially be BOOLEAN searching about 6 database fields

Re: [PHP-DB] Values in a date field

2007-03-17 Thread tg-php
(n, strtotime($subscription_begins)); http://us3.php.net/manual/en/function.date.php -TG = = = Original message = = = 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

Re: [PHP-DB] SQL Query - Using variable from another SQL Query

2007-02-12 Thread tg-php
Try this as your SQL. It should give you all the results, then you can use PHP to sort it all out. SELECT * FROM egw_cal WHERE cal_category='501' and cal_id in (SELECT cal_id FROM egw_cal_dates where cal_start $tstamp) -TG = = = Original message = = = Hello Everyone Got a simple

Re: [PHP-DB] 2 queries -- 1 array

2007-01-12 Thread tg-php
to ask. -TG = = = Original message = = = Hello, I need to query two different tables and create one BIG array. I can query both tables, but can't find a way to combine the results in one array. The problem comes in with the second table. It has a weird layout. The second table only has four

Re: [PHP-DB] 2 queries -- 1 array

2007-01-12 Thread tg-php
too, I'm just not fully groking the situation I think. -TG $name = $row['NAME']; $business = $row['BUSINESS']; $address = $row['ADDRESS']; $city = $row['CITY']; $phone = $row['PHONE']; $contactname = $row['CONTACT_NAME']; $contactvalue = $row['CONTACT_VALUE']; $bigarray

Re: [PHP-DB] Filter array results... no copies

2007-01-11 Thread tg-php
If all you want is a unique list of adr_one_region codes, then use the DISTINCT keyword in your SQL: SELECT DISTINCT adr_one_region FROM egw_addressbook WHERE cat_id='8' ORDER BY adr_one_region -TG = = = Original message = = = Hello everyone I'm back working on the website again... I'm

Re: [PHP-DB] Order By [blank]

2006-12-21 Thread tg-php
change what appears in your results. This only affects the sorting: select * from sometable order by if(ifnull(somecolumn, '') = '', '', somecolumn) Hope that helps. -TG = = = Original message = = = I have this column in mysql: A F D [ empty ] A C If I do an order

Re: [PHP-DB] Order By [blank]

2006-12-21 Thread tg-php
change what appears in your results. This only affects the sorting: select * from sometable order by if(ifnull(somecolumn, '') = '', '', somecolumn) Hope that helps. -TG = = = Original message = = = I have this column in mysql: A F D [ empty ] A C If I do an order

Re: [PHP-DB] Order By [blank]

2006-12-21 Thread tg-php
chance of typos. BTW: In my example, realistically you could probably shorten the morphed value to ZZ or ZZZ unless you think you'll values in your database that will start with and get bumped lower on the sorting. -TG = = = Original message = = = In case the blank is a null or is really

Re: [PHP-DB] MSSQL Server

2006-12-21 Thread tg-php
random data sources I had to from time to time. http://adodb.sourceforge.net/ Sorry I don't have time to look for good examples, but maybe the documentation will help out some and get you on the right path. -TG = = = Original message = = = I cannot connect to my MSSQL server. I use

Re: [PHP-DB] search result error message

2006-12-21 Thread tg-php
need to use the mysql_affected_rows() either unless you want to test for zero results and display an error message, like I believe you wanted to do. -TG = = = Original message = = = Hi, The below mentioned code works fine. Connects to the database, fetches the result, and displays neatly

Re: [PHP-DB] running program after insert w/MySQL 4.1

2006-07-07 Thread tg-php
the database check. You could probably get the last inserted ID number as well and pass that to the PHP script if you want to check specific records right after they're inserted. -TG = = = Original message = = = I have an Access database connecting via ODBC to a local MySQL machine and doing

Re: [PHP-DB] Problem with list#2

2006-07-07 Thread tg-php
and unsubscribe using one of your email addresses and see if that solves the problem. -TG On 7/7/06, Karl James [EMAIL PROTECTED] wrote: Team, I am still receiving duplicate emails. I check with my ISP and they tell me it is Not their problem. I tried to check the headers But I am

RE: [PHP-DB] LIMIT

2006-07-05 Thread tg-php
queries are better than one. -TG = = = Original message = = = I see they call mysql_query twice which doesn't look like I'm gaining anything over running the 2 queries: SELECT count(*) as MyCount FROM aTable SELECT * FROM aTable LIMIT 5 But I suppose I need to time it for my app. http://us3

Re: [PHP-DB] Select distinct field won't return distinct value

2006-06-06 Thread tg-php
it, but ultimately it's not worth the bending over backwards for (do I remember right that you can do it with crosstab queries? don't even know if MySQL will do those properly). Easier just to do it with one of the methods above. Good luck! -TG = = = Original message = = = I want select

Re: [PHP-DB] Automatically +1 every 30 mins to a value in the database.

2006-06-02 Thread tg-php
many 30 minute periods have occurred between the timestamp and now and update the gold then. The cron job is preferrable but if you're looking for alternate ideas, there's one for ya. Good luck! -TG = = = Original message = = = Hi there. I've posted this up on both this list, and the mysql

Re: [PHP-DB] MySQL/PHP Left Join Question

2006-05-25 Thread tg-php
['Title']; $publisher = $dvddata['Publisher']; $comments = $dvddata['Comments']; foreach ($comments as $comment) { // do whatever } } There are other ways to handle this.. this might be one of the easier ones (if I'm understanding your problem correctly). -TG = = = Original message

Re: [PHP-DB] Adding url to google

2006-05-12 Thread tg-php
guessing it's not going to really be feasible for you to do this... not easily at least. -TG = = = Original message = = = Hi all, I am developing the site using php and mysql. I have to add the url at google site through php code. If any one have idea about it, please help me. Regards Manoj

Re: [PHP-DB] Too stupid to UPDATE...

2006-05-12 Thread tg-php
PHP. Good luck! -TG = = = Original message = = = I am trying to write a script to handle event registration. Most of the people that will be registering are already in the database, but not all, and those that are may not have current information. Here is my latest effort, or at least

Re: [PHP-DB] Excel to CSV

2006-03-11 Thread tg-php
.. and figure out how to read XLS files that way. The Excel Object Model might help you with the proper properties/methods/etc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_wrcore/html/wrgrfexcelworkbookobject.asp Good luck. -TG = = = Original message = = = Dear All, Have you

Re: [PHP-DB] Installing PEAR

2006-03-03 Thread tg-php
. -TG = = = Original message = = = I know this may be a bit off-topic, but I would like to use the PEAR library to implement some of my database functions. Unfortunately, the PEAR documentation is woefully incomplete and as a result i've been unable to install it properly. Here's the procedure i

Re: [PHP-DB] Duplicate rows

2006-03-01 Thread tg-php
something a little more automated. Without more info though, it's hard to say exactly what can be done. Hope that helps a little bit. -TG = = = Original message = = = My dear beloved friends, I have a catalog of products that a product provider gave, sadly for me, in this CSV file there are many

Re: [PHP-DB] Duplicate rows

2006-03-01 Thread tg-php
Haha.. oh yeah.. DISTINCT works too.. in this case you'd get a list of all totally 100% unique records. If you had an auto_increment column though, you'd want to exclude it from the list. -TG = = = Original message = = = SELECT DISTINCT * FROM `tablename` On Wednesday 01 March 2006 7:24

Re: [PHP-DB] Storing money values in MySQL

2006-01-20 Thread tg-php
that's the keyword that would have done it for me. I appreciate the help guys! Best of luck to both of you (and anyone else I inadvertantly missed who may have responded). -TG = = = Original message = = = Me again, Sorry for the rtfm stuff, I googled around and found this: http://bugs.mysql.com

RE: [PHP-DB] Date Time 90 minutes ago

2006-01-19 Thread tg-php
H:i:s, mktime($hour, $minute - 90, $second, $month, $day, $year)); It will even adjust for leap years I believe. You can add/subtract/etc any of those items and it's smart enough to figure out what the correct resulting date/time would be. -TG = = = Original message = = = ?php echo date(Y-m

[PHP-DB] Storing money values in MySQL

2006-01-19 Thread tg-php
of things to doublecheck. If anyone has any comments, criticisms, information, etc... I'd love to hear them. We're running MySQL 4.1.11-standard. Thanks! -TG ___ Sent by ePrompter, the premier email notification software. Free download

Re: [PHP-DB] Refreshing text question!

2006-01-18 Thread tg-php
header(Last-Modified: . gmdate(D, d M Y H:i:s) . GMT); // always modified header(Cache-Control: no-store, no-cache, must-revalidate); // HTTP/1.1 header(Cache-Control: post-check=0, pre-check=0, false); // HTTP/1.1 header(Pragma: no-cache); // HTTP/1.0 good luck! -TG = = = Original message

RE: [PHP-DB] MySQL date casting..

2006-01-17 Thread tg-php
did that part 'normal') ApptTime: HH:MM [AM|PM] Thanks for the response though Stephen... always worth going over the simple stuff first. :) -TG = = = Original message = = = Could you not just add: ORDER BY ApptDate, ApptTime To the end of your SQL - this will order the set by date then time

Re: [PHP-DB] MySQL date casting..

2006-01-17 Thread tg-php
%H:%i:%s') duh... hah. Thanks! I knew it was something simple. -TG -- What's wrong with [using] this? mysql select str_to_date('2005-10-27 07:00 PM', '%Y-%m-%d %l:%i %p'); +-+ | str_to_date('2005-10-27 07:00 PM', '%Y-%m-%d

RE: [PHP-DB] Formatting a form box

2006-01-12 Thread tg-php
type=submit /form ?php if (isset($_POST['testarea'])) { echo nl2br($_POST['testarea']); } ? Look at the source code after you submit if you have any doubts/questions. -TG = = = Original message = = = use the nl2br() function to convert the newlines to br bastien From: Alex Major [EMAIL

Re: [PHP-DB] Date Formatting Question

2005-12-14 Thread tg-php
= SELECTED; else $selected = ; echo option value='$i'$selected$selectMonthText/option\n; echo /select\n; -TG = = = Original message = = = I am trying to format the month portion of a date that I am trying to pull from MySQL to be placed into a drop down menu to modify the date. I

Re: [PHP-DB] Minor Change

2005-12-12 Thread tg-php
guessing. Let us know if you find anything else out. -TG = = = Original message = = = After adding echo mysql_error(); I get the same result. I tried changing the query to include 109fh7 (a table which doesn't exist) and got the same result as with 109fh6. Changing to 109fh5 does pull up

Re: [PHP-DB] Need a Help!

2005-12-12 Thread tg-php
think you get the idea I'm trying to convey. -TG = = = Original message = = = I have table and insert data using song_id, that means one artist can have many song_ids. my question is how can I query distinct artist with his/her song_id while I will not get duplicate data like duplicate artist

Re: [PHP-DB] Storing an array on a table?

2005-09-01 Thread tg-php
to do though, definitely check out serialize (unless someone knows something I don't). Serialize() should do essentially what's being proposed below, just without having to figure out what string may not be in your array. good luck! -TG = = = Original message = = = if you just have a simple

Re: [PHP-DB] Storing an array on a table?

2005-09-01 Thread tg-php
. -TG = = = Original message = = = Yes, this has been mentioned in this thread. But with serialize/ unserialize, you can run into other problems that may be more confusing/difficult to troubleshoot. e.g.: http://www.php.net/serialize As you can see, the original array : $arr[20041001103319

Re: [PHP-DB] SQL Injection attack

2005-08-25 Thread tg-php
better ways of doing this, I'm all for hearing it. Please opine or criticize what I've posted above too. I want to learn as well. -TG Code: ?php /** *~DBSanitizeData() prepares data for inserting/updating into or selecting from * MySQL by making sure that string data is properly escaped so

Re: [PHP-DB] SQL Injection attack

2005-08-25 Thread tg-php
. Now off to find my newer version and make sure I chaned it there too. -TG = = = Original message = = = no !!! mysql_real_escape_string() anyhow.. good luck with your security endeavors! On 8/25/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm pretty amateur at this too, but have done

Re: [PHP-DB] Case sensitive

2005-08-24 Thread tg-php
but will make your case sensitivity issue moot. HTH -TG = = = Original message = = = Hi there everyone, I have a little problem, I have a search where people can search the address of a property BUT the search is case sensitive, I don~t WANT it to be. I~m using MySQL and PHP and I generally

Re: [PHP-DB] Connecting to SQL Server

2005-08-10 Thread tg-php
. Down here it says Cargo System databases you'll find examples that might help. Sorry to be vague, but hopefully it's a start for you. Once you get it configured, it should work fairly fluidly. -TG = = = Original message = = = I have been asked by my client to use SQL Server for my php

Re: [PHP-DB] Integrated Authentication on IIS 6.0

2005-05-23 Thread tg-php
-assuming what your configuration is. Mind giving us more detail on the process you're trying to fix? Users connects to web server, web server makes ODBC connection (by what means?), etc.. -TG = = = Original message = = = Hi, I have an intranet application that I wrote in PHP that has worked great

RE: [PHP-DB] Integrated Authentication on IIS 6.0

2005-05-23 Thread tg-php
handles the connection. Don't know if that helps, but that's the next place I'd check, unless someone else has better insight. -TG = = = Original message = = = Thanks for the response! Yes, believe it or not it does work, or at least did on IIS 5. When I turn on Integrated Security on the web

Re: [PHP-DB] GROUP BY? Urgent help needed with selection list

2005-01-22 Thread tg-php
actually Akron and not some suburb of Chicago or something, then you're going to have to tell it yourself. I think this is the best solution for you. Best of luck! -TG = = = Original message = = = Hi there everyone, I~m using the following code to populate cities from a huge database

Re: [PHP-DB] to many addresses

2004-12-27 Thread tg-php
address. Good luck Matt! -TG = = = Original message = = = 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

Re: [PHP-DB] Comparing Two Values

2004-12-21 Thread tg-php
a string?) If so, the === should work I believe. It should compare variable types as well as values so it shouldn't convert 0002 to just 2 before doing the evaluation. Good luck! -TG = = = Original message = = = Hi List, I was comparing two values, a current value with a new value to build