Re: [PHP-DB] Select the specific user data from the database

2010-09-05 Thread Phpster
I would suggest that you keep authorization separate from data access Bastien Sent from my iPod On Sep 5, 2010, at 9:19, nagendra prasad wrote: > PS: Want to check the username from a table and the password from another > table. > > Is it possible ?? > > -- PHP Database Mailing List (http

Re: [PHP-DB] Select the specific user data from the database

2010-09-05 Thread Phpster
Then each record needs to have a user filed where their is stored. Then your access query just adds an additional filter to check this value Select * from data_table where user = $user Bastien Sent from my iPod On Sep 5, 2010, at 7:21, nagendra prasad wrote: > Hi Experts, > > I have a mysql

Re: [PHP-DB] Database management

2010-08-25 Thread Phpster
On Aug 25, 2010, at 19:27, Karl DeSaulniers wrote: > Hello fellow PHPers, > Question, > 1. Does anyone know of a good Open source MS SQLServer management software > for MAC? > I have been charged with updating a companies Microsoft SQLServer and I > usually work in MySQL. > Need a freeware if

Re: [PHP-DB] Sqlite inserts inside a PDO fetch loop

2010-05-28 Thread Phpster
Can't you do a limit in the extract SQL and mark the records extracted so that you don't end up extraxting the same ones? Bastien Sent from my iPod On May 28, 2010, at 5:49 PM, Brandon wrote: Hello, I have a situation where I am trying to create an index of words contained in a partic

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

2010-02-27 Thread Phpster
No more so than in any other SQL query Bastien Sent from my iPod On Feb 27, 2010, at 9:52 PM, 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

Re: [PHP-DB] Storing images

2010-02-03 Thread Phpster
Sure is. Save the data in a blob field. Lots of examples on the net on how to get it there and back out again. Note that you will also find arguments about whether or not to do it in the first place. I prefer not to, as it causes significant performance issues when the image table gets to

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

2010-01-23 Thread Phpster
If you change the $_POST to &_REQUEST in this piece of code $author_name = $_POST["author_name"];' To make it $author_name = $_REQUEST["author_name"];' Should fix that issue Bastien Sent from my iPod On Jan 23, 2010, at 4:26 PM, Joe Keenan wrote: This is all that results from the i

Re: [PHP-DB] scheduler

2009-09-23 Thread Phpster
Scheduled task? Bastien Sent from my iPod On Sep 23, 2009, at 6:46 AM, Vinay Kannan wrote: Hi, I am developing a web application in PHP, the db is mysql. I want to develop something like a batch file, which would run everyday, query mysql and throw the output to another table which would

Re: [PHP-DB] Local version of php/mysql site

2009-09-21 Thread Phpster
On Sep 21, 2009, at 6:51 PM, Chris wrote: Zeth Lietzau wrote: Hi all, I've developed a web site where users complete a web form which pushes their data into a MySQL database. At the back end they can run reports of their input from this database. At the high end, users enter input into

Re: [PHP-DB] DELETE mySQL query

2009-08-16 Thread Phpster
On Aug 16, 2009, at 12:23 AM, "Ron Piggott" wrote: 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_b

Re: [PHP-DB] Making two columns

2009-08-15 Thread Phpster
On Aug 15, 2009, at 2:26 PM, "Ron Piggott" wrote: 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

Re: [PHP-DB] mysql_query

2009-08-10 Thread Phpster
On Aug 10, 2009, at 4:15 AM, "Ron Piggott" wrote: I have the syntax mysql_query("INSERT INTO );"); If this is successful I want to do update a column in one of my tables $query = "UPDATE ... "; mysql_query($query); How do I test if the INSERT INTO mysql_query, in order to trigger

Re: [PHP-DB] Code optimization

2009-08-07 Thread Phpster
On Aug 6, 2009, at 7:52 PM, "Ron Piggott" wrote: Is there a way to optimize this with better mySQL query? # Select today's Bible verse mysql_connect('localhost',$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query="SELECT * FROM verse_of_the_da

Re: [PHP-DB] 500 records (articles) - SELECT ALL or USE WHERE

2009-08-04 Thread Phpster
On Aug 4, 2009, at 7:18 PM, Martin Zvarík wrote: I need to do about 5 queries: 1) pick the top visited articles 2) pick the recent articles (limit 10) 3) pick the most commented articles etc. Now, I have 2 choices: 1) SELECT ALL records and use PHP for conditions 2) do 5 queries on MySQ

Re: [PHP-DB] newbie: how to return one iteration *per unique date (DAY!)* in a timestamp column?

2009-08-04 Thread Phpster
On Aug 4, 2009, at 6:21 PM, Chris wrote: Govinda wrote: I should have given an example .. select count(*) as record_count, date(column_name) as date_field, 'my_table' as table_name union all select count(*) as record_count, date(column_name) as date_field, 'my_table_2' as table_name

Re: [PHP-DB] newbie: how to return one iteration *per unique date (DAY!)* in a timestamp column?

2009-08-03 Thread Phpster
On Aug 3, 2009, at 12:29 AM, Govinda wrote: Oops, forgot to mention that with the alias you can change the ORDER BY clause to use the aliased column data: ORDER BY solarLandingDate DESC this will only use the returned data instead of the entire column. If you are aliasing a column it

Re: [PHP-DB] finder

2009-07-16 Thread Phpster
On Jul 16, 2009, at 5:50 PM, "Emiliano Boragina" > wrote: Hi again… I searching in www and find this (to do the finder): $sql = "SELECT buildings.*, citiy.* FROM buildings, city WHERE buildings.idcity = city.id "; Dont understand “building.*”... what do it means? Thanks. +

Re: [PHP-DB] resize 10 upload image

2009-07-11 Thread Phpster
On Jul 10, 2009, at 10:18 PM, "Emiliano Boragina" > wrote: Hi again… How do I do to resize more than one image when I upload using php and not any library like the “gd” I have this: $folder="../products"; copy($_FILES['5']['tmp_name'],$folder.'/'.$_FILES['5']['name']); $picture5=$

Re: [PHP-DB] oci8 1.3.4 working for months on my simple browser based php

2009-05-31 Thread Phpster
If I had to guess the config.w32 is the window 32 bit config file. So I would try the other Bastien Sent from my iPod On May 31, 2009, at 15:28, Fred Silsbee wrote: For months I've had a Oracle 11g1 browser based table access site/ program working. I do regular Fedora 9 yum updates and

Re: [PHP-DB] Date formatting question

2009-04-08 Thread Phpster
See the date function Http://www.php.net/date Bastien Sent from my iPod On Apr 8, 2009, at 21:41, Jack Lauman wrote: I need to reformat the output of the 'dates' field from '2009-04-08' to 'Wed. Apr. 8th'. Any help would be appreciated. Thanks. --- for ($counter = 0; $counter < mysql_n

Re: [PHP-DB] Dynamic text for every user

2009-03-14 Thread Phpster
On Mar 14, 2009, at 8:27, Wilson Osemeilu wrote: How do i create a table with user id and password, where every user get to see a dynamic text related to them only I get the same dynamic text when every user logs in but i really want them to see their details in the mysql database only. Pl

Re: [PHP-DB] Retrieving Image Location in MySQL

2009-03-07 Thread Phpster
Bet the image is not readable from the web server. Bastien Sent from my iPod On Mar 7, 2009, at 5:04, Sashikanth Gurram wrote: Hi, Yes. But I assign the location of the image ( C:\Users\Sashikanth \Desktop\Bldgs_lots\Burruss.jpg) to the $location variable by using the mysqli_fetch_array(

Re: [PHP-DB] Storing Image Location in MySQL

2009-02-22 Thread Phpster
On Feb 22, 2009, at 5:17, Joao Gomes Madeira wrote: Hey Sashi You want something similar to this: (you must have GD installed on Apache) you can have this working by doing something like this in HTML: and having as picture.php: Error getting image...'; } else { header('Content-Type: ima

Re: [PHP-DB] Work Online From Home

2009-02-04 Thread Phpster
Of course it is sincere as in we sincerely want to spam all of you Bastien Sent from my iPod On Feb 4, 2009, at 21:36, Foster Sidower wrote: Hi, Our organization starts recruiting employees willing to take part in well-paying research studies conducted by leading online businesses. Your opi

Re: [PHP-DB] printable pdf

2009-02-04 Thread Phpster
I like dompdf from www.digitaljunkies.ca. I do something similar and just pass that class the HTML for the page Bastien Sent from my iPod On Feb 4, 2009, at 0:04, Ron wrote: Hi All, I'm creating a billing system wherein a user can view invoices. and if the user wants to print it a click

Re: [PHP-DB] data from db to a page and then to another page

2009-01-07 Thread Phpster
The easiest way is to pass the record id via a $_GET and then query for your record band name Bastien Sent from my iPod On Jan 7, 2009, at 4:54 AM, "Mika Jaaksi" wrote: I already can get the data from database to a page. Now I want to make link from that data to next page and on that ne

Re: [PHP-DB] Echoing a variable within a variable.

2009-01-06 Thread Phpster
A couple of options: 1. Use eval($databaseString); there are risks as it could be used to execute arbitrary code should the database be compromised. 2. If your data string is enclosed in single quote php won't evaluate the variables. Consider changing the outside quotes to double quotes.

Re: [PHP-DB] mktimestamp help

2008-12-30 Thread Phpster
$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 wrote: Hi, I'm trying to do online subscription on my site. I need to determine the expirationdate of the subscription, given the date today is the start of subsc