Private Label and Cobranded VoIP Solutions
BrainCast internet & phone based message/memo recording & reminder organization system
Internet Phone Service and Broadband Phone Service by ViaTalk

Go Back   VoIP Forums, Internet Phone Service Forums, & Web Hosting Forums > CoderForums - Programming Discussion > General Programming Issues > Programming Languages & Technologies > PHP

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-17-2002, 08:35 PM
dragon dragon is offline
Registered User
 
Join Date: Oct 2001
Location: New York
Posts: 10
Thumbs Down PHP installed on server

I'm new with PHP and MySQL. I finally was able to create a database, a user and I started creating a table.
All of this from HR control panel (I select MySQL etc...)
I enetered the fields (5 in my case and tried to select the attributes and the rest, but I'm not familiar with it).
When I click on save, I get an error:

Database test - table jobs running on localhost
Error
SQL-query :

CREATE TABLE `jobs` (`Description` TEXT(40) BINARY NOT NULL AUTO_INCREMENT PRIMARY KEY, `SalaryMINM` TEXT(10) BINARY DEFAULT 'MIN' AUTO_INCREMENT, `SalaryMAX` TEXT(10) BINARY DEFAULT 'MAX' AUTO_INCREMENT, `Industry` TEXT(15) BINARY AUTO_INCREMENT, `Comments` TEXT(30) BINARY DEFAULT 'NO Comments' AUTO_INCREMENT) COMMENT = 'table comments'

MySQL said:


You have an error in your SQL syntax near '(40) BINARY NOT NULL AUTO_INCREMENT PRIMARY KEY, `SalaryMINM` TEXT(10) BINARY

I'm not ure what the problem is.
I've tried to go to the documentation, but it's GREEK to me and also it doesn't talk about the control panel at all.
I see often the MySQL> (prompt). How do you get there? or what is the equivalent on the windows interface in control panel?

Please help.
I'm just trying to create a table so I can enter data and then be able to display it on a browser.

Thanks in advance,
Anthony
Reply With Quote
  #2  
Old 03-17-2002, 08:57 PM
dragon dragon is offline
Registered User
 
Join Date: Oct 2001
Location: New York
Posts: 10
Indifferent small table created

Right after I posted the message above, I was able to create a small table, by not changing type of field and not selecting anything under attributes. So I would probably need to learn ll the options for the field under "type" , "attributes", etc.. Any good sites or any advice?
Anthony
Reply With Quote
  #3  
Old 03-18-2002, 12:48 AM
dragon dragon is offline
Registered User
 
Join Date: Oct 2001
Location: New York
Posts: 10
Indifferent progress but not complete yet

I think I was able to connect to the database. (I get no error message).
I now want to display the content of my table on my browser and cannot do it. I get this error message:
1044: Access denied for user: '@localhost' to database 'anthony_gdooley'

I will attach the file so maybe somebody can help (it's in txt format so I can attach it, but the real file has a.php extension).

I copied the code from other sites and modified it.
I'm not sure about the fields and how they are recalled or referred to in the .php file.
Please help,
Anthony
Attached Files
File Type: txt welcome.txt (1.5 KB, 99 views)
Reply With Quote
  #4  
Old 03-18-2002, 12:58 AM
El_Nino El_Nino is offline
Tropical Storm
 
Join Date: Feb 2001
Posts: 484
I highly suggest you change the password for your database since it was listed in that text file. The database name should be in the form of: yourusername_databasename so if your username was anthony and the database name was test, you need to set $dbName equal to anthony_test not just test.
Reply With Quote
  #5  
Old 03-18-2002, 12:41 PM
dragon dragon is offline
Registered User
 
Join Date: Oct 2001
Location: New York
Posts: 10
Thumbs Down learning php and mysql

Thanks El_Nino.
I've been trying to get somebody I know to do this for me but I couldn't find anyone that would do it for little money or free.
So I've been reading and searching on various web sites, but it all looks like greek to me. It's like the manuals and tutorials are for an older system or maybe I just don't know enough. I wish there would be something on HR control panel that apply to our situation, meaning instructions and tutorials on how to create files in PHP and MYSQL using the resources we have at HR.

Anyway as you see from my posting, last night finally I've decided to do more than I've got before and I've found sites with info I could use. So I was able to create a database and then a table, and then connect, and then display data on my browser.
I was posting questions trying to speed up the learning process, but I guess since it was the weekend, nobody was there so I kept going.
It took me several hours, but I've got at least the basics.

Questions (Some of them I posted before):
- I see often the MySQL> (prompt). How do you get there?
- Is there a site where I can find in simple terms all the options for the field under "type" , "attributes", etc.. ?
- From what I see php files are pretty generic. Could I use php files from tutorial sites for my projects?
- What is the benefit of using php in emails?
- For my project I need to be able to change a text file on my PC and post it to the server and have the old data on the server whiped out. What is the best way of doing that? So far I've been entering the data from MySQL admin in HR control panel and that works. Right now when I post a text file from my Pc, the info is appended, even thought I select "Replace" in the option. I guess it must be because that option "replaces the contents of the selected table for rows with identical primary or unique key." and I don't know how to change it after the table has been created.

Attached is my new file which is really a test file.

Anthony
Attached Files
File Type: txt welcome.php.txt (1.6 KB, 101 views)
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump