Re: [PHP-DB] Is this syntax is correct?

2010-09-06 Thread Richard Quadling
On 6 September 2010 16:11, Ken Kixmoeller wrote: > 2. As Amit kind of said, no password should be stored in a table (available > on a web server) without encrypting the password information. I'd go further and say "no password should be stored in a table". A hash of the salted password, sure.

Re: [PHP-DB] Is this syntax is correct?

2010-09-06 Thread Ken Kixmoeller
Amit Tandon wrote: SELECT d.username, r.password FROM data join registration r on r.username SELECT username FROM data, password FROM registration WHERE username=%s AND password=%s" Oh, boy -- "r on r"?? Obviously the guy is a rookie. Let's be simple: SELECT data.username,registration.pas

Re: [PHP-DB] Is this syntax is correct?

2010-09-06 Thread Amit Tandon
SELECT d.username, r.password FROM data join registration r on r.username = d.username WHERE r.username like '%s' AND r.password like '%s'" Presuming the password stored as clear text and username is common field SELECT d.username, r.password FROM data join registration r on r.username = d.u

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

2010-09-06 Thread Paul Vatta
You could also try the following approach: - on the table, have an INSERT trigger add the username to a column named CREATE_WHO (this can be extended to UPDATE operations too, but this probably isn't necessary in your example) - create a view based on "select * from table where CREATE_WHO = SUBSTRI

[PHP-DB] Module positioning

2010-09-06 Thread Abah Joseph
Sorry if i`m posting on the wrong list. i have used joomla and prestashop open source application and enjoy the way modules are position, prestashop uses HOOK to position modules inside the template while in joomla you define position name and place the module inside the position, in my own case,

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

2010-09-06 Thread Richard Quadling
On 5 September 2010 12:21, nagendra prasad wrote: > Hi Experts, > > I have a mysql database. What I want is that when a user login he can able > to see his entries only, so that he can delete, add or edit his entries > only. I have 2 different tables one for user details and another for actual > e