Jump to content

Table?


eduard

Recommended Posts

Ok, output: table created.But I want to see the table on my screen!
well, there's more to it than that. You have to add information the table, and then you can look in the tutorials under the SELECT example for simple way's to output the data.
Link to comment
Share on other sites

  • Replies 165
  • Created
  • Last Reply

By the way, Eduard, in order to make further discussions easier, there's something you should do...1. Open MAMP.2. From the menu (at the top), go to "File > Edit Template > PHP5 php.ini".3. While the new window is opened, press together the "command" and "f" keys.4. In the new dialog box, search for "error_reporting = ".5. Change the whole line to say

error_reporting = E_ALL | E_STRICT

6. Back at the search box, search for "display_errors = ".7. At the found line, change the whole line to say

display_errors = On

Link to comment
Share on other sites

By the way, Eduard, in order to make further discussions easier, there's something you should do...1. Open MAMP.2. From the menu (at the top), go to "File > Edit Template > PHP5 php.ini".3. While the new window is opened, press together the "command" and "f" keys.4. In the new dialog box, search for "error_reporting = ".5. Change the whole line to say
error_reporting = E_ALL | E_STRICT

6. Back at the search box, search for "display_errors = ".7. At the found line, change the whole line to say

display_errors = On

I am not able to do that! (I have MAMP in spanish!)And will you please answer the question how I see a table on my screen(NOT ONLY THE OUTPUT)Where is the table??
Link to comment
Share on other sites

Just a guess based on Google Translate...File - ArchivoEdit Template - Editar plantillaPHP5 php.ini - PHP5 php.ini (it's the same...)If that's not it, will you be so kind as to translate back my instructions into Spanish manually? Just look for "PHP5 php.ini" in the menus.And I already answered your question about how to see the table (read all replies!!!) - open phpMyAdmin. You can see it there.

Link to comment
Share on other sites

well, there's more to it than that. You have to add information the table, and then you can look in the tutorials under the SELECT example for simple way's to output the data.
Information where???? (I don´t see a table!)
Link to comment
Share on other sites

Information where???? (I don´t see a table!)
I know. Right now the table as a structure only exists in SQL. When you add data (records) to a table, then you will have something actually worth displaying. So you have to read the tutorials about INSERT. And to get the data so you can display the output, you can read the tutorials on SELECT. (All within the PHP master tutorial under PHP/SQL).Theres a reason we keep telling you to login to phpMyAdmin. When you create a database and tables, you can the databases listed on the left hand side. You can select them to see all the tables, and records for those tables (if they've been added) through that interface. Seeing it in phpMyAdmin is just a helpful way for you to see how your database is organized and to make manual changes/edits to the information. You still need to use PHP/SQL to get the data out so you can display it in a webpage.
Link to comment
Share on other sites

Just a guess based on Google Translate...File - ArchivoEdit Template - Editar plantillaPHP5 php.ini - PHP5 php.ini (it's the same...)If that's not it, will you be so kind as to translate back my instructions into Spanish manually? Just look for "PHP5 php.ini" in the menus.And I already answered your question about how to see the table (read all replies!!!) - open phpMyAdmin. You can see it there.
First, that could be the translations (Google is bad!), but when I open MAMP, it is NOT in the top menu!Second, I have really a problem to install (and use phpMyAdmin!). Either I can´t open the files either I can´t log in and I am too stressed to read a lot!
Link to comment
Share on other sites

I finally found my databases (MAMP > db)! But how do I open them?
You don't.That's what we keep trying to tell you. This is NOT like a text file you open/read/write/save.You interact with the database by using SQL queries. Queries like the "CREATE" we already did, as well as others like "INSERT", "SELECT" and so on, all of which are presented in detail in the SQL tutorial.The only visualization you can get is one which tools like phpMyAdmin give you. Under the hood, they also use SQL queries, but at least it's more visual.
Link to comment
Share on other sites

First, that could be the translations (Google is bad!), but when I open MAMP, it is NOT in the top menu!Second, I have really a problem to install (and use phpMyAdmin!). Either I can´t open the files either I can´t log in and I am too stressed to read a lot!
How about the apple symbol at the top? "MAMP"? "Servers"? The "Help" menus? What do those bring up?
Link to comment
Share on other sites

I know. Right now the table as a structure only exists in SQL. When you add data (records) to a table, then you will have something actually worth displaying. So you have to read the tutorials about INSERT. And to get the data so you can display the output, you can read the tutorials on SELECT. (All within the PHP master tutorial under PHP/SQL).Theres a reason we keep telling you to login to phpMyAdmin. When you create a database and tables, you can the databases listed on the left hand side. You can select them to see all the tables, and records for those tables (if they've been added) through that interface. Seeing it in phpMyAdmin is just a helpful way for you to see how your database is organized and to make manual changes/edits to the information. You still need to use PHP/SQL to get the data out so you can display it in a webpage.
Thanks!
Link to comment
Share on other sites

You don't.That's what we keep trying to tell you. This is NOT like a text file you open/read/write/save.You interact with the database by using SQL queries. Queries like the "CREATE" we already did, as well as others like "INSERT", "SELECT" and so on, all of which are presented in detail in the SQL tutorial.The only visualization you can get is one which tools like phpMyAdmin give you. Under the hood, they also use SQL queries, but at least it's more visual.
Ok, thanks!
Link to comment
Share on other sites

By the way, Eduard, in order to make further discussions easier, there's something you should do...1. Open MAMP.2. From the menu (at the top), go to "File > Edit Template > PHP5 php.ini".3. While the new window is opened, press together the "command" and "f" keys.4. In the new dialog box, search for "error_reporting = ".5. Change the whole line to say
error_reporting = E_ALL | E_STRICT

6. Back at the search box, search for "display_errors = ".7. At the found line, change the whole line to say

display_errors = On

I found out how I can change the settings of MAMP (installing MAMP PRO)Because it´s risky to change the template do you refer to PHP 5.2.13 or 5.3.2.?
Link to comment
Share on other sites

I found out how I can change the settings of MAMP (installing MAMP PRO)Because it´s risky to change the template do you refer to PHP 5.2.13 or 5.3.2.?
Both (just in case).What this setting does is to show you all errors in your code on screen when you run the PHP file. And I do mean all errors, including those that before this setting would give you a blank screen. Errors like missing a ";", adding ";" where it's not supposed to be added, missing a "{", etc. (the formal term is "syntax errors" or "parser errors").
Link to comment
Share on other sites

  • 2 weeks later...
Both (just in case).What this setting does is to show you all errors in your code on screen when you run the PHP file. And I do mean all errors, including those that before this setting would give you a blank screen. Errors like missing a ";", adding ";" where it's not supposed to be added, missing a "{", etc. (the formal term is "syntax errors" or "parser errors").
Tomorrow I´ll give you a reply to this question!
Link to comment
Share on other sites

I don't know what your "my-db" is, but if you're talking about the database, no, a database is not a PHP file.You're not checking for errors when you try to create the table, you should check if the query failed and print an error message if it did.mysql_query($sql,$con) or exit(mysql_error());
Where and how do I check the php file for errors?
Link to comment
Share on other sites

Where and how do I check the php file for errors?
Do the setting I told you to do!!!!They will let you know of any errors if there are any.
Link to comment
Share on other sites

Do the setting I told you to do!!!!They will let you know of any errors if there are any.
The problem is I can´t change anything! To do the settings I have to be in MAMP PRO and this has expired!
Link to comment
Share on other sites

The problem is I can´t change anything! To do the settings I have to be in MAMP PRO and this has expired!
Why didn't you do it earlier?!?!?!?!?!?!?!F*@%.... fine, search the MAMP folder for "php.ini". Open every file found. Do steps from 3 on.
Link to comment
Share on other sites

Why didn't you do it earlier?!?!?!?!?!?!?!F*@%.... fine, search the MAMP folder for "php.ini". Open every file found. Do steps from 3 on.
Yes, you are right! I had forgotten it and read it again 4 days ago!The past 2 weeks I was improving my website.
Link to comment
Share on other sites

By the way, Eduard, in order to make further discussions easier, there's something you should do...1. Open MAMP.2. From the menu (at the top), go to "File > Edit Template > PHP5 php.ini".3. While the new window is opened, press together the "command" and "f" keys.4. In the new dialog box, search for "error_reporting = ".5. Change the whole line to say
error_reporting = E_ALL | E_STRICT

6. Back at the search box, search for "display_errors = ".7. At the found line, change the whole line to say

display_errors = On

I am on line!Can you explain it to me again (from point 4 it isn´t working)?
Link to comment
Share on other sites

What's the problem? You need to find the error_reporting and display_errors settings in php.ini, and set them. The error_reporting setting needs to be set to "E_ALL | E_STRICT", and display_errors needs to be set to "On" (without the quotes).Can you find each of those settings? What exactly is not working? After you change those settings you should restart the server.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...