Re: [PHP-DB] Compatibility with PHP and MySQL

2011-09-05 Thread Chris Stinemetz
On Mon, Sep 5, 2011 at 3:49 PM, Gabriel Solberg solbergdes...@gmail.com wrote: Will installing the most recent XMAPP to install PHP MySQL and Apache to create a development environment on my local computer affect how everything runs when I upload it to the server (My web host 1and1.com runs php

[PHP-DB] foreign key

2011-08-09 Thread Chris Stinemetz
Okay. I am pretty new to mysql so this may seem like a ridiculous question to some people. I am trying to use a LEFT JOIN query, but the results I am finding unusual. For every record occurrence there is for the query, the results are duplicated by that amount. So if there are 3 records from the

Re: [PHP-DB] foreign key

2011-08-09 Thread Chris Stinemetz
Is users.user_id unique? yes it is. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] foreign key

2011-08-09 Thread Chris Stinemetz
Roe Blvd' ORDER BY stores.store_date DESC Chris Stinemetz 08-09-2011 02:08PM600kbps-3.8mbps testChris Stinemetz 08-09-2011 02:07PM0-250kbps test1Reply: Bella Roe 4980 Roe BlvdSELECT stores.store_subject, stores.store_comments, stores.store_date, stores.store_tptest, stores.store_by, users.user_id

Re: [PHP-DB] foreign key

2011-08-09 Thread Chris Stinemetz
Okay. I just validated it is not in the left join query, but in my php. I was able to build the correct relations. Does anyone see any think in the php code below that may cause duplicate table rows? Thank you all. ?php //store.php include_once 'includes/connect.php'; include_once

[PHP-DB] Re: php-db foreign key

2011-08-09 Thread Chris Stinemetz
| chrisstinemetz | Chris | Stinemetz | | Bella Roe 4980 Roe Blvd | test1 | 2011-08-09 14:07:49 | 0-250kbps |1 | 1 | chrisstinemetz | Chris | Stinemetz

Re: [PHP-DB] Re: php-db foreign key

2011-08-09 Thread Chris Stinemetz
Your php code had more than one query running (one inside the other). It's the outer query that runs twice, not the inner one returning double the results Thanks Peter, Do you have any suggestions on how to fix this? Thank you, Chris -- PHP Database Mailing List (http://www.php.net

Re: [PHP-DB] Re: php-db foreign key

2011-08-09 Thread Chris Stinemetz
Yes, debug your code and figure out why it's looping twice instead. For instance, try the other query in the mysql console. Thank you! It was the first query. I put a LIMIT 1 on it and now it is working correctly. I appreciate your help! Thank you, Chris -- PHP Database Mailing List (http

[PHP-DB] Left Join

2011-08-07 Thread Chris Stinemetz
I am tyring to build a query that will take the most recent stores.store_date column then join it with store_list.store_name where store_list.store_name and stores.store_subject match then return the most recent stores.store_date. I am guessing this will require some sort of join. I have been

Re: [PHP-DB] Left Join

2011-08-07 Thread Chris Stinemetz
each table that have a similar relationship are stores.store_mar and store_list.id_market. Once the foreign key is build what would be the correct syntax to achieve my query? Thank you very much, Chris

[PHP-DB] Insert query error

2011-08-05 Thread Chris Stinemetz
I am getting the following error trying to run the below query. Any suggestions on what I am doing wrong? Thank you, Something went wrong while inserting your store visitCannot add or update a child row: a foreign key constraint fails (`store`.`posts`, CONSTRAINT `posts_ibfk_1` FOREIGN KEY

[PHP-DB] cascading select

2011-07-14 Thread Chris Stinemetz
there are no choices. Hopefully someone can find something I missed in the following code snippits. Any help is greatly appreciated. Please excuse the incorrect indentions. For some reason gmail changes it. Thanks, Chris ajax code... script $(document).ready(function(){ $(select#type

Re: [PHP-DB] Re: radio form submission

2011-06-24 Thread Chris Stinemetz
. It is greatly appreciated. Chris Form echo 'form method=post action= Store name: input type=text name=store_subject /br /br / Market

[PHP-DB] radio form submission

2011-06-23 Thread Chris Stinemetz
So far I am good on creating the form and submitting it to mysql database and calling the submitting value from a different script. My question is: How can I make it so when a user selects radio option value 1 it will then be displayed as 0-250kbps when I call it the value in the bottom script?

Re: [PHP-DB] radio form submission

2011-06-23 Thread Chris Stinemetz
On Thu, Jun 23, 2011 at 2:49 PM, Daniel P. Brown daniel.br...@parasane.net wrote: On Thu, Jun 23, 2011 at 15:46, Chris Stinemetz chrisstinem...@gmail.com wrote:    Use an if or a switch.  For example: I think your suggestions are exactly what I am looking for. I am not sure exactly where

Re: [PHP-DB] radio form submission

2011-06-23 Thread Chris Stinemetz
   Use an if or a switch.  For example: I think your suggestions are exactly what I am looking for. I am not sure exactly where to place it. Do I insert it after the query statment? Thank you, Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

[PHP-DB] ORDER BY DESC

2011-06-20 Thread Chris Stinemetz
posts.post_store = . mysql_real_escape_string($_GET['id']); Thank you in advance for your help. Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] ORDER BY DESC

2011-06-20 Thread Chris Stinemetz
On Mon, Jun 20, 2011 at 3:49 PM, Karl DeSaulniers k...@designdrumm.com wrote: Try.. $posts_sql = SELECT posts.post_store, posts.post_content, posts.post_date, posts.post_by, users.user_id, users.user_name FROM posts LEFT JOIN users ON osts.post_by = users.user_id WHERE posts.post_store =

[PHP-DB] delete message function

2011-06-13 Thread Chris Stinemetz
I created the below delete function, but it doesn't seem to be working correctly. When I enter the correct password it get my echo Incorrect Password Did not Delete! When I leave the password blank the message will delete from mysql table. Am I missing something?? Thanks in advance, Chris

[PHP-DB] Re: delete message function

2011-06-13 Thread Chris Stinemetz
On Tue, Jun 14, 2011 at 12:31 AM, Chris Stinemetz chrisstinem...@gmail.com wrote: I created the below delete function, but it doesn't seem to be working correctly. When I enter the correct password it get my echo Incorrect Password Did not Delete! When I leave the password blank the message

[PHP-DB] mysql_query

2011-06-06 Thread Chris Stinemetz
); Beow is my whole script for processing the form in case it maybe something else. Thanks, Chris !doctype html public -//w3c//dtd html 3.2//en html ?php // database access parameters $dbservertype='mysql'; $servername= left out for privacy; // username and password to log onto db server

[PHP-DB] Event Calendar tutorial

2011-05-31 Thread Chris Stinemetz
Hello all, I am curious if anyone knows of a good tutorial to build an event calendar? Thank you, Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] PHP Delete confirmation

2011-04-28 Thread Chris Stinemetz
I have been trying to figure out how to add delete confirmation for the bellow snippet of code. I would prefer not to use javascript. Can anyone offer any advise on how to right the delete confirmation in PHP? Thank you in advance. P.S. I apologize for the indention. For some reason gmail messes

[PHP-DB] automactic email notification

2011-04-13 Thread Chris Stinemetz
I have an all-in-one form which allows record edits, adds and deletes in a mysql table. I would like to add the ability to automatically send email update to a distribution list whenever a record is edited, deleted, or added. I won't be hosting my own mail server so instead I will be using

Re: [PHP-DB] Re: automactic email notification

2011-04-13 Thread Chris Stinemetz
On Wed, Apr 13, 2011 at 11:08 AM, Jim Giner jim.gi...@albanyhandball.com wrote: Without looking at your HUGE code stream, I'm curious what your question really is.  If you know how to send an email, and you know how to update your table, then isn't your task simply to send an email after

[PHP-DB] error

2011-04-07 Thread Chris Stinemetz
this issue? I have been googling it for a couple hours now. Thank you in advance! Chris ?php error_reporting(E_ALL); ini_set('display_errors', '1'); /* EDIT.PHP Allows user to edit specific entry in database */ // creates the edit record form // since this form is used multiple times

Re: [PHP-DB] error

2011-04-07 Thread Chris Stinemetz
I am pretty sure it is in my code. I am just getting an error form one of my echoes. Still can't get it to work correctly though. Any help is greatly appreciated. Thank you, Chris ?php /* EDIT.PHP Allows user to edit specific entry in database */ // creates the edit record form // since

Re: [PHP-DB] Re: jpgraph and mysql passing array

2011-03-27 Thread Chris Stinemetz
[57] = 1 [58] = 2 ) JpGraph ERROR 25121 From the research I have done so far using Jpgraph I have found this link to a similar issue: http://ubuntuincident.wordpress.com/tag/jpgraph/ but I am unable to get my arrays from the sql query to populate the graph. Thank you in advance, Chris

[PHP-DB] jpgraph and mysql passing array

2011-03-23 Thread Chris Stinemetz
-SetBackgroundImageMix(15);    $graph-legend-Pos(0.02,0.03,right,top);    $graph-legend-SetFont(FF_FONT1,FS_BOLD);    $graph-xaxis-title-Set(Miles);    $graph-yaxis-title-Set(MBusage);    $graph-SetAlphaBlending();    // Display the graph    $graph-Stroke(); ? Thank you, Chris -- PHP

Re: [PHP-DB] SUM() Math in mySQL

2010-12-19 Thread Chris
On 20/12/10 15:38, Ron Piggott wrote: I am working on the query below. It’s purpose is to manage the RSS Feed for the site. The part of the query I am struggling with is: SUM(`include_in_rss_feed`) AS current_rss_feed What I need is the total value of *ALL* the `include_in_rss_feed` , not

Re: [PHP-DB] NULL to 0 result

2010-12-15 Thread Chris
On 15/12/10 21:42, Richard Quadling wrote: On 14 December 2010 21:53, Ron Piggottron.pigg...@actsministries.org wrote: What change is needed to this query so if “currently_in_rss” is NULL it will be assigned a value of 0 SELECT `reference`, COUNT(`reference`) AS currently_in_rss FROM

Re: [PHP-DB] Reading from file

2010-11-01 Thread Chris
On 02/11/10 14:34, Ethan Rosenberg wrote: Dear List - Thank you for all your help. Here is another one. I have a file [/home/ethan/PHP/RecNum] which consists of the number 1005. It also has been 1005. No matter how I do it, it is only recognized as 1. Here is the code. In this case, the

Re: [PHP-DB] Variable Assignment

2010-10-28 Thread Chris
However, I am totally confused. All the texts state that to set a variable, the code is: $st=100; That's how you do it in php. Doing it in the db is different and depends on the db you are using. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing List

Re: [PHP-DB] Creating an INDEX on multiple tables?

2010-10-24 Thread Chris
On 22/10/10 21:00, Ron Piggott wrote: I have moved the GROUP BY outside now Chris. In the queries that make up the UNION ALL (such as below) is there a way to only SELECT matches that are 70% or greater based on the users input? Right now each and every listing is a search result. http

Re: [PHP-DB] Creating an INDEX on multiple tables?

2010-10-21 Thread Chris
On 22/10/10 13:31, Ron Piggott wrote: Bastien (and others) I am still having one problem with this query I don't know how to resolve: When I add the category column: `ministry_categories`.`category` as part of the MATCH () I receive the error: Incorrect arguments to MATCH I create the LEFT

Re: [PHP-DB] Creating an INDEX on multiple tables?

2010-10-21 Thread Chris
On 22/10/10 15:24, Ron Piggott wrote: The query works using UNION ALL and MATCH ( ) AGAINST --- one table at a time for the MATCH. The down side is that each SELECT is giving it's own search results. The directory listings are being displayed multiple times when one of the SELECTS produces it as

Re: [PHP-DB] RE: php-db Digest 19 Oct 2010 22:24:15 -0000 Issue 4629

2010-10-19 Thread Chris
On 20/10/10 09:55, Jimmy Sole wrote: Hello everyone, I'm having trouble executing a insert select query in PHP Here is the code: $exec = self::init()-prepare(INSERT INTO owners (f_name, l_name, username, password, email, company, str_address,

Re: [PHP-DB] Query for duplicate records

2010-10-17 Thread Chris
On 18/10/10 06:55, Ron Piggott wrote: Is there a query you could help me write a SELECT query that would search table `ministry_profiles` for where column `organization` has the same organization more than once? I am trying to delete the duplicate organization records, but I am working with

Re: [PHP-DB] Re: SOUNDS_LIKE, SOUNDEX

2010-10-11 Thread Chris
On 12/10/10 08:45, Ron Piggott wrote: After looking at the response I tried to make 2 mySQL queries that I need help with. (I didn't use the PHP functions because I am trying to query the database for results: #1: SELECT `word` FROM `bible_concordance_words` WHERE SOUNDEX('command') ORDER BY

Re: [PHP-DB] Slashes or no slashes

2010-08-24 Thread Chris
In the case that your comparing a field to a field in the database (the field name) do you escape that or because it is hardcoded you dont need to? My thoughts are that you need to escape all data going in. Correct. A field name is not data though. You've already validated it (somehow, either

Re: [PHP-DB] Slashes or no slashes

2010-08-23 Thread Chris
/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Ah.. thanks Chris. If I want to compare that value I get from the database to what a user entered, do I escape the value they entered or add htmlspecialchars to it before comparing it to what

Re: [PHP-DB] Slashes or no slashes

2010-08-23 Thread Chris
To be more specific. Is this correct? function confirmUP($username, $password){ $username = mysql_real_escape_string($username); /* Verify that user is in database */ $q = SELECT password FROM TBL-U WHERE username = '$username'; I normally do it in the query in case you use the variable

Re: [PHP-DB] Slashes or no slashes

2010-08-23 Thread Chris
Just to make sure, cause I am ready to get past this. Is this correct? function confirmUP($username, $password){ /* Verify that user is in database */ $q = SELECT password FROM .TBL_USERS. WHERE username = '.mysql_real_escape_string($username).'; Perfect. /* Retrieve password from result

Re: [PHP-DB] Slashes or no slashes

2010-08-23 Thread Chris
Got it. So only when I am going to diplay the result from the database. I see. Or email (or otherwise present it to the user), yes. But for comparing $dbarray['password'] to $password, don't I have to escape $password and then md5 it? Right. -- Postgresql php tutorials

Re: [PHP-DB] Slashes or no slashes

2010-08-22 Thread Chris
On 20/08/10 08:05, Karl DeSaulniers wrote: On Aug 19, 2010, at 4:44 PM, Karl DeSaulniers wrote: On Aug 19, 2010, at 4:36 PM, Daevid Vincent wrote: You should be using http://us2.php.net/manual/en/function.mysql-escape-string.php You don't need to search with extra slashes for retrieval.

Re: [PHP-DB] SELECT with ' in search term

2010-08-12 Thread Chris
On 13/08/10 13:26, Ron Piggott wrote: If the variable $segment has an ' in it the $query won't work because of having 3 ' 's. Should I be using: $segment = mysql_real_escape_string($segment); before querying the database? Use it in your query. Don't use it anywhere else. Your code may use

Re: [PHP-DB] Re: Stuck in apostrophe hell

2010-08-03 Thread Chris
On 03/08/10 23:04, paul_s_john...@mnb.uscourts.gov wrote: Yes, I may have mixed up the input and output from different iterations of running it. Let me try posting this again although it may not be an issue. Once again if I enter two sequential apostrophes in the name (O''Brien) the INSERT

Re: [PHP-DB] calling a page for each row

2010-07-15 Thread Chris
On 16/07/10 09:38, listread wrote: We need to load a page which performs some tasks specific to each record, including writing some results to another table. I have tried to place a page loading script within the while loop that creates the table, but it seems to only load the page on the last

Re: [PHP-DB] calling a page for each row

2010-07-15 Thread Chris
On 16/07/10 09:51, listread wrote: On 7/15/2010 6:42 PM, Chris wrote: On 16/07/10 09:38, listread wrote: We need to load a page which performs some tasks specific to each record, including writing some results to another table. I have tried to place a page loading script within the while loop

Re: [PHP-DB] anyone has experience with pgslq Cybercluster 2 ?

2010-06-01 Thread Chris
On 02/06/10 04:34, Artur Ejsmont wrote: Hi there i just noticed announcement of cybercluster 2 release for postgres. http://www.cybertec.at/en/postgresql_news they say its open source but did not find downloads on their site ; ) Anyone has experinece with it? i loved postgres and used to work

Re: [PHP-DB] Need Simple PHP mysql search engine script

2010-05-24 Thread Chris
On 24/05/10 16:01, nagendra prasad wrote: Hi Chaitanya, I have used the below script but its not meeting my requirements. What I need is that I have a database in which their are names which I wanted to use as keywords. I want to search with only one variable called Names. the other stuff will

Re: [PHP-DB] PHP / iODBC / PostGreSQL: running into a deadlock

2010-05-24 Thread Chris
To try to solve this issue, I grabed the sources for PHP (5.3.2) and libiodbc (3.52.7). When ran under GDB, I can observe the following: odbc_exec() [PHP code] calls SQLAllocStmt() [libiodbc code], which calls some internal function that tries to call SQLAllocStmt(), in some indirect recursive

Re: [PHP-DB] Call two class object failed

2010-05-23 Thread Chris
On 24/05/10 11:55, win.a wrote: Hi my friend,i wrote two classed on is user,the other is db .The user have a property which from the db class object . When i writing my application have both class object invoked at the same time ,just like $user_a = new user($para); $db_a = new db() Then the

Re: [PHP-DB] how to upgrade php in linux

2010-05-04 Thread Chris
On 05/05/10 15:02, Chaitanya Yanamadala wrote: hai dan thank you for your suggestion regarding the google thing.. thank god u said me that or else i could have never known that google will get me all the results. dude i just asked this question thinking that some one would help me find the

Re: [PHP-DB]how to handle exception in php

2010-05-02 Thread Chris
On 02/05/10 15:26, Bavithra R wrote: hi friends I am doing a simple student mark details project. for calculating rank I need to compare the total marks one by one. To do so i use *for loop.* so atlast while reaching the end of the table it shows the following warning. * Warning*:

Re: [PHP-DB] Problem with pg_prepare - PostgresSQL

2010-04-26 Thread Chris
Giancarlo Boaron wrote: Hi all. I'm receiving the following message when I try to use pg_prepare() function: Call to undefined function pg_prepare(). My application works very well with others pg_* commands... What version of php do you have? This came in with 5.1.0 according to the

Re: [PHP-DB] Sharing happiness!!

2010-04-21 Thread Chris
Chaitanya Yanamadala wrote: Are promotional messages a part of the PHP-DB No, it's spam that got through the filters. Thankfully we don't get many of them. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] Sharing happiness!!

2010-04-21 Thread Chris
Karl DeSaulniers wrote: Well what's weird is that the person who it says sent it is someone who helped me with a PHP problem. So that means the spammers are spoofing our email addresses to send their spam. That's nothing new. Not to mention this spam email had all our email addresses in the

Re: [PHP-DB] Sharing happiness!!

2010-04-21 Thread Chris
That's quick thinking, but they were still in the message they sent. I know I have them all right here. My point being that anyone that got that message, now has all our emails. Your email is already available anyway. Everything posted here is archived at http://lists.php.net/

Re: [PHP-DB] Session Timeout question

2010-04-18 Thread Chris
Karl DeSaulniers wrote: What is the best way to set a user timeout on a session? Say if the user steps away from their computer for say 5 min, and they come back to the page they were on, I want when the user clicks something for the session to kick them off and redirect to login saying their

Re: [PHP-DB] mySQL date query

2010-04-13 Thread Chris
Ron Piggott wrote: I am trying to write a mySQL query on my stats table. I am trying to determine the number of records (users) during a 7 day period ending yesterday. I always to keep it current ... Yesterday will keep changing. In other words I want to know the number of users who accessed

Re: [PHP-DB] Postgres - how to skip 'sequence' columns

2010-04-12 Thread Chris
Gary . wrote: Is it possible to skip column(s) in the target table when using pg_copy_from? When I tried to bulk insert some data from a csv file by way of pg_copy_from I received the error Warning: pg_copy_from() [function.pg-copy-from]: Copy command failed: ERROR: permission denied for

Re: [PHP-DB] phpmailer/mysql/ timout issues

2010-04-11 Thread Chris
ad wrote: I'm running php 5.1.6 with mysql 5.0.45 on CentOS 5.3 box trying to loop through a while statement to send about 3000 email using phpmailer. It's worked well in the past but after an upgrade it seems to be timing out now After an upgrade of what? php? mysql? phpmailer? the whole

Re: [PHP-DB] Mysql completing Query fast but mysql-query() takes long time to return even single selects/updates

2010-04-11 Thread Chris
David Murphy wrote: As you can see PHP claims it took 20 seconds for mysql-query() to return but mysql think is took around 1.0s This is from our application I enabled profile in mysql to determine why an update took 20seconds. As you can see MySQL reported no where near that amount

Re: [PHP-DB] reading PDF file into a DB

2010-04-07 Thread Chris
Vinay Kannan wrote: Hello Guys, I am working on a project, which requires a PDF file to be read page wise into the DB, once it has been uploaded, the contents from the PDF would then appear on a Flash screen. I need help reading the contents of the PDF file into DB retaining the page numbers,

Re: [PHP-DB] Shopping cart application question

2010-04-03 Thread chris smith
The } else { confuses PHP.  I am not sure what I should be doing. You're missing at least one brace. If the code you supplied is a copy of what you have, you're missing a } for the end of the while loop and one for the end of the else condition. So it's treating } else { as part of the while

Re: [PHP-DB] Ldap sasl bind(gssapi problem)

2010-03-28 Thread Chris
??? wrote: Hallo there everyone, after finishing my server side configuration so as to have the maximum security i tried this morning to do a sasl bind with my ldap server , my file looks like that: *$ldapbind=ldap_sasl_bind($ldapconn,NULL,NULL,GSSAPI,TEIPIR.GR

Re: [PHP-DB] Building indexes

2010-03-18 Thread Chris
listread wrote: Chris, I just assumed that everyone on this list was using MySQL... That's what we're using (v. 5.1.45 GA) with InnoDB as the engine. Most people are but there are lots of types of databases out there :) (I just read your tutorial at http://www.designmagick.com/article/16

Re: [PHP-DB] Building indexes

2010-03-17 Thread Chris
listread wrote: Greetings! We are working on a 4 million record db with about 55 fields. We need to build indexes to speed queries, but it seems to take way too long. I'm assuming your using mysql but that's just a guess. What database? (mysql, oracle, postgres, firebird, sqlite, other) If

Re: [PHP-DB] oci_commit always returns true even when the transaction fails.

2010-03-16 Thread Chris
ZeYuan Zhang wrote: Hi there. Why oci_commit function always returns true even when the transaction fails. I just copied the code in the php manual [Example 1636. oci_commit() example], and runned it, the situation is as follows: * The statements do commit at the moment when oci_commit

Re: [PHP-DB] oci_commit always returns true even when the transaction fails.

2010-03-16 Thread Chris
Christopher Jones wrote: Chris wrote: ZeYuan Zhang wrote: Hi there. Why oci_commit function always returns true even when the transaction fails. I just copied the code in the php manual [Example 1636. oci_commit() example], and runned it, the situation is as follows

Re: [PHP-DB] Calculator

2010-03-16 Thread Chris
Karl DeSaulniers wrote: Hello, I have been asked to see if I can set up an online calculator. I was wondering if anyone had some pointers on where I can lear/find a script that calculates percentages. The regular math part I think I can figure out. Its not a complicated calc, just basic math and

Re: [PHP-DB] 64-bit Linux -- Fatal ... undefined function mysql_connect()

2010-03-01 Thread Chris
andrew jarcho wrote: Hello all, I'm running Fedora 12 (64-bit), Apache 2.2.14, PHP 5.3.1, MySQL 5.1.42, on a Dell laptop. snip I get the message: Fatal error: Call to undefined function mysql_connect() snip The output of my phpinfo() includes: Is that from command line or webpage?

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

2010-02-28 Thread Chris
Ben Hubbell wrote: Hello, My web host does not have join queries in phpMyAdmin enabled. My web host is inexpensive, but their commitment to costumer service is inconsistent. They often dismiss bug reports as feature requests. When pressed to enable join queries in phpMyAdmin several years

Re: [PHP-DB] Injection Attack?

2010-02-25 Thread Chris
Gary wrote: I have a DB on a site that is not really up anymore (a redirect because of a merger), and it seems to have been attacked. I always use REMOTE_IP so that I have a record and able to ban IP's of the endless form spammers, however on this attack, the IP listed is my local IP

Re: [PHP-DB] Re: Need a tool for mysql file

2010-02-25 Thread Chris
Ferdi wrote: -- Forwarded message -- From: nagendra prasad nagendra802...@gmail.com To: PHP DB php-db@lists.php.net, phpexpe...@yahoogroups.com, php mysql php_mysql_usergr...@yahoogroups.com Date: Thu, 25 Feb 2010 16:52:40 +0200 Subject: Need a tool for mysql file Hi All, I

Re: [PHP-DB] Login query

2010-02-18 Thread Chris
Bastien Koert wrote: On Thu, Feb 18, 2010 at 4:40 PM, Ron Piggott ron@actsministries.org wrote: I am wondering what others do for a login query. I think there could be two results: correct e-mail password; correct e-mail wrong password So far my login query is: SELECT * FROM `member`

Re: [PHP-DB] php_warn

2010-02-16 Thread Chris
madunix wrote: solved by setting error reporting to 0 in “configuration.php” file $mosConfig_error_reporting = '0; That hides the problem, it doesn't solve it. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP-DB] IFNULL

2010-02-14 Thread Chris
Ron Piggott wrote: 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`

Re: [PHP-DB] Getting total quantities

2010-02-14 Thread Chris
Karl DeSaulniers wrote: Would it be? $q = SUM(ProductStock) FROM products; or $q = SELECT SUM(ProductStock) AS ProductStock FROM products; if I want to return $ProductStock as the value? This one. The AS gives it an alias (or shortcut) to make it easier to find in mysql_fetch_array etc.

Re: [PHP-DB] Getting total quantities

2010-02-14 Thread Chris
Chaitanya Yanamadala wrote: Have you tried using it like this *select count(*) from products;* This will give you the number of rows in the table, not what Karl wants. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To

Re: [PHP-DB] Getting total quantities

2010-02-14 Thread Chris
Karl DeSaulniers wrote: Ok, sweet, then I am on the right track. Now I did notice that I forgot the SELECT in the first query, does that matter? Can I just start out with SUM? No - that's invalid sql. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing List

Re: [PHP-DB] upload multiple files and rename wih time()

2010-02-07 Thread Chris
Emiliano Boragina wrote: Hello php fellows, I have two codes to upload multiple files, works very well, but I cant rename the files... really i dont know... The code looks ok. Do you get an error message? If not, turn up error_reporting and enable display_errors:

Re: [PHP-DB] Cross reference query help

2010-02-07 Thread Chris
Ron Piggott wrote: The following is a query I am working on today. I need help tweaking on it. What I am trying to get for results from the query are where there are rows in either table, not all 3 tables linked together. In other words I am trying to INNER JOIN these two pairs of tables for

Re: [PHP-DB] Storing Images #2

2010-02-04 Thread Chris
elk dolk wrote: On 3 February 2010 16:07, wrote: I currently have all my images referenced by url in my database and stored in a folder/s and I think I will keep it that way... .. If you put the images OUTSIDE of the

Re: [PHP-DB] PHP and MYSQL Update problem

2010-01-26 Thread Chris
Manu Gupta wrote: try .. $q = addslashes(UPDATE episodes SET episode_title = '$_POST[episode_title]' , episode_scheduleddate = .strtotime($_POST['episode_scheduleddate']). , episode_description = '$_POST[episode_description]' WHERE episode_id = $_POST[episode_id]); or try $q = UPDATE episodes

Re: [PHP-DB] Automatic logoff

2010-01-26 Thread Chris
listread wrote: Bruno, Thanks for the heads up on the php configuration. I'll check that out. We also need to write some data to a database, things like logout time. That means running a script for some other php code. There are probably a number of situations where the onUnload thing

Re: [PHP-DB] Procedure Parameter OUT values

2010-01-26 Thread Chris
WebPat wrote: Chris wrote: WebPat wrote: I am surprised by the order of the data returned from my stored procedure, and that it appears associated with the incorrect variables. Apparently the data is returned entirely positionally, without consideration for the variable names. So, the names

Re: [PHP-DB] Procedure Parameter OUT values

2010-01-24 Thread Chris
WebPat wrote: I am surprised by the order of the data returned from my stored procedure, and that it appears associated with the incorrect variables. Apparently the data is returned entirely positionally, without consideration for the variable names. So, the names of the OUT parameters in the

Re: [PHP-DB] result set in php pagination

2010-01-24 Thread Chris
Joe Keenan wrote: Thanks very much Bastien. I haven't the faintest idea why but that simple change in the code sorted all of this. The pagination links now follow through with the complete result set of my query. I will now have to read around this to discover why the change works. By

Re: [PHP-DB] Transferring rows between 2 databases on 2 web servers

2010-01-17 Thread Chris
Ferdi wrote: Hi Everybody, There are n number of web servers all having the same Linux-Apache-MySQL-Php setup, with identical databases. Each of these servers functions as a billing server at a store of my company. Now I am required to set up a master server that will copy all data from each of

Re: [PHP-DB] printf and unsecable char

2010-01-04 Thread Chris
Jean-Philippe Battu wrote: Hello I would like to print a string formatted on the right side and fill in the left side with the unsecable character [nbsp;] I read in the printf command I could use : printf( %#30s , $mystring ) ; to display $mystring string with the character # before (on the

Re: [PHP-DB] auto creation of email IDs

2009-12-16 Thread Chris
Vinay Kannan wrote: Hey Guys, I've been at this for couple of days now, and have no clue where to start, and was almost thinking about scrapping the project, It would be great help if anyone can give me some advice, or guide me in the right direction. I have a portal, where users would come in

Re: [PHP-DB] Hello

2009-12-15 Thread Chris
Karl DeSaulniers wrote: What does this do exactly? Documentation was a bit fuzzy for me. Is it needed at all times to protect with? Per the docs: prepends backslashes to the following characters: \x00, \n, \r, \, ', and \x1a. So anything that has a null character, a newline

Re: [PHP-DB] Hello

2009-12-15 Thread Chris
addslashes doesn't take encoding's into account. http://shiflett.org/blog/2006/jan/addslashes-versus-mysql-real-escape-string goes into some details. Karl DeSaulniers wrote: So what's the difference with that and addslashes() ? Karl Sent from losPhone On Dec 15, 2009, at 3:50 PM, Chris

Re: [PHP-DB] Random pick

2009-12-14 Thread Chris
David McGlone wrote: Hi everyone, I've been lurking in the shadows on the list for quite some time and now I'm in need of a little info or advise. I'm looking for a way to grab a record out of a database on a certain day each month and I'm wondering if this can be accomplished with just a

Re: [PHP-DB] Hello

2009-12-14 Thread Chris
Karl DeSaulniers wrote: HI, Thanks for your response. Here is my query. UserID is auto incrament and UserLastLogin is a current_timestamp. $query_users = INSERT INTO users(UserID, Username, UserEmail, UserPassword, UserFirstName, UserLastName, UserCompany, UserAddress, UserAddress2,

Re: [PHP-DB] Mysql query

2009-12-14 Thread Chris
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( FROM_UNIXTIME( 1239508800 ) ) , INTERVAL LEAST( 14, ( SELECT COUNT( * ) FROM `verse_of_the_day_Bible_verses` WHERE

Re: [PHP-DB] Hello

2009-12-14 Thread Chris
Karl DeSaulniers wrote: Hi Chris, On Dec 14, 2009, at 8:09 PM, Chris wrote: Problem 1 is sql injection. Wrap each variable in a mysql_real_escape_string call: insert into table (...) values (' . mysql_real_escape_string($username) . ' At one point I did have

Re: [PHP-DB] Random pick

2009-12-14 Thread Chris
David McGlone wrote: On Monday 14 December 2009 21:02:37 Chris wrote: David McGlone wrote: Hi everyone, I've been lurking in the shadows on the list for quite some time and now I'm in need of a little info or advise. I'm looking for a way to grab a record out of a database on a certain day

  1   2   3   4   5   6   7   8   9   10   >