I need to do Left Join with multiple databases/tables.
SELECT db1.table1.id-db2.table1.hits
FROM db1.table1-db2.table1
LEFT JOIN db1.table2 ON db1.table1.id=db1.table2.id WHERE db1.table1.id=db2.table1.id
Mysql error says "unknown column db1.table1.id in ON clause"
Please help :(
I would like to create a simple customer login page.
I am aware of various programs available and different methods with php and mysql which I do not want to spend time learning. Instead my hosting provider provides a feature to password protect certain webpages.
However- my problem is getting my clients to the right page. What I want to do is have a form field on login page in which the user enters their username. The user is then directed to their page and asked for their password.
i.e. - On login page user enters username in form field -> |user1| this entry is then put into a web address -> http://www.mywebsite.com/user1.html The user would then be asked for his/her password and on entering this gain access to his/her personal page on my site.
All help big or small will be greatly appreciated.
Thanks in advance!
Response to answer 1:
I am sending the user to a page which IS password protected by my provider. Therefore- if you enter the address for this user s page you will be asked to enter this user s password. The first page where the user enters their username is simply to direct them to their page where they will be asked for the password.
Thanks anyway for your contribution!
I probably should have worded this differently. I simply want a formfield which when a username is entered it is used to redirect the user. So if the user enters username1 they will be directed to http://www.mywebsite.com/username1.html. If they enter username524 they will be directed to http://www.mywebsite.com/username524.html
Thanks again!
Hello
Just wondering if there were any programs to easily install php on the OS i stated. Something which installs both PHP and Apache and anything else needed. I tried to do it once but it failed so Im wondering about the programs.
Oh- and also MySQL!
Thanks"
Table: datadump
Columns: table- column- data
Data I want to insert: They are variables; $table- $column- $data
I know that the mysql_select_db and mysql_connect is ok and I will not give that for security reasons- but what about this syntax:
$sql = "INSERT INTO datadump (table- column- data) VALUES ($table-$column-$data)";
$mysqlquery = mysql_query($sql-$con);
if(!$mysqlquery)
{
die( Error: . mysql_error());
}
When I run the script with this syntax- I get the following error:
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near table- column- data) VALUES (index-name-fruits) at line 1
Can you please tell me what to do?
Same problem after taking the first answerer s advice
Same problem again with second answerer s advice
I heed help to get my query working.
So far i need - some how to select rows from 2 different databases and tables located on the same server. Particularly i need to select rows from db1.table1 and ORDER it by column in db2.table2. Both tables have column ID.
Example of what i need:
SELECT table1.id-table1.country FROM db1 ORDER BY db2.table2.cities
Made it Work now- Also had to change db permissions for user to access multiple db s. Thanks Chris C.
I have purchased a cheap website off a friend for £30 a year- and the reason I done this was simply to try to get familiar with MYSQL and PHP- as I am going to be learing this in univesity in september.
I bought this website simply as a mess around to see how it works etc- but now Im really liking the idea of having this website and taking it more seriously.
I am 20 year old business and IT student- and therefore trying to make this work ould help me with my studies.
Im not really bothered if this doesnt take off- as it wasnt what i planned to do..
This is the website (not finished yet)
www.myrealestatehomes.org
As you can see I have no listings for houses or apartments etc up just yet- as i literally just got this up on the web about an hour ago! Im a little confused- as i thought it would have had a tool for passers by to add their property..
I have no idea where to get the housing listings from?
Would you say my nxt step is to contact agents- asking to promote their properties? x
No comments:
Post a Comment