[thelist] PHP Events Calendar - URGENT HELP NEEDED!!!

Joshua Hmielowski jhmielowski at comcast.net
Tue Apr 5 00:20:16 CDT 2005


Not sure exactly what you are asking here as well as highlighted text  
does not usually make it when
comments are posted.

But for question [1]:
It is not necessary to call an table name in the config file.
If the table already exists and you want to do an INSERT,
you can just change the $db_table variable to coincide with which table  
you want to add to.

i.e.:
$db_table= "any_table';

$sql = "INSERT INTO '".$db_table."' (`event_day` , `event_month` ,  
`event_year'.......

As far as question [2]:
You are going to need to do a join to get the info you want...
http://livedocs.macromedia.com/dreamweaver/mx2004/using/wwhelp/wwhimpl/ 
common/html/wwhelp.htm?context=Using_Dreamweaver&file=47_sql7.htm

JH

On Monday, April 4, 2005, at 07:26  AM, Albert Shala wrote:

> Major problem:
>  I have a config.php file and it's content is:
>
> <?
> $version = "MySoft";
> $admin_username = "****";
> $admin_password = "****";
>
> // MYSQL DB INFO
> $DBHost = "localhost";
> $DBName = "anything_db";
> $DBUser = "*************";
> $DBPass = "*********";
> *$TBL_PR = "events";
> *?>
>
> here's the event_add.php file:
>
> <?
> if(isset($_POST['submit'])){
> require_once("config.php"); $db_connection = mysql_connect ($DBHost,
> $DBUser, $DBPass) OR die
> (mysql_error());
> $db_select = mysql_select_db ($DBName) or die (mysql_error());
> *$db_table = $TBL_PR = "events";
> *
> $sql = "INSERT INTO *$db_table* (`event_day` , `event_month` ,  
> `event_year`
> , `event_time` , `title` , `description`) VALUES ('".$_POST['day']."',
> '".$_POST['month'] . "', '".$_POST['event_year'] . "', '" .  
> $_POST['hour'] .
> ":" . $_POST['minute'] . "', '" . $_POST['title']."',
> '".$_POST['description']."')";
>
> mysql_query($sql) or die(mysql_error());
> $_POST['month']++;
> ?>
>
> See the above highlighted text, can anyone tell me how would i need to
> declare another table, i think it would be done in *config.php *so  
> that i
> can insert into another table, exmple would be into departments and  
> all, but
> i can't add info into a second table help is required.
>
> Also can i do a select stament like this: SELECT * FROM $*db_table1*, *
> $db_table2*, *$db_table3*
>
> *Thanks*
> --
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>
>
Joshua Hmielowski
<><><><><><><><><><><>
Independent Studio
[tel] 970-429-7469
[cel] 970-274-0870
www.independentstudio.net




More information about the thelist mailing list