You are here: Re: php and insert query « PHP SQL « IT news, forums, messages
Re: php and insert query

Posted by J.O. Aho on 10/11/70 11:55

seeker55 wrote:
> I have a insert.php which is suppose to show a record on the screen. I
> run it and see nothing on the screen. following is the code used
>
> <?php
> $mysql_id = mysql_connect(localhost, 'root', 'kali');
> mysql_select_db($mysql_id, 'memphisproject');
> $result = mysql_query($mysql_id, select * from tblsponsor);
This line isn't correct, do

$result=mysql_query("select * from tblsponsor");

or

$result=mysql_query("select * from tblsponsor",$mysql_id);

(as long as you working against one sql server in your script, you don't need
to use the $mysql_id as the latest connection will always be used if this info
is omitted).

> while ($row1 = mysql_fetch_row($result)) {
> echo $row1[0];
> }
> mysql_free_result($result);
> />
>
> This is on a test box to eventually be transferred to a web hosting
> company. Another question is when you build a database with phpmyadmin
> where is it stored on the test box.

The data goes into the database, where the files with the data is stored
depends on where you sql server is installed and what OS you are running.


//Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация