davidspeare
Members-
Posts
15 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
davidspeare's Achievements
Newbie (1/5)
0
Reputation
-
Does anyone see why I am getting an error message with the below select statement? I am using Excel VBA to connect to a web server. I'm getting an error that the ODBC driver does not support the properties. rs.Open "(SELECT [*] from [movie] WHERE [movie_year] like ['2000'])", cn, adOpenKeyset, adLockOptimistic, adCmdTable Thanks for the assistance.
-
Anyone able to help here?
-
Sorry to be <i> that new guy</i> but i can not see why my detail are not falling into a table. The $movie_header is executing fine, but the $movie_details are not dumping into the table, they are just being displayed in one row under the header... <?php include "config.php"; $link = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); mysql_select_db('test'); $query = "SELECT movie_name, movie_director, movie_leadactor " . "FROM movie"; $result = mysql_query($query, $link) or die (mysql_error()); $num_movies = mysql_num_rows($result); //LINE 20 $movie_header=<<<EOD <h2><center>Movie Review Database</center></h2> <table width="70%" border = "10" cellpadding="2" cellspeacing="2" align= "center"> <tr> <th>Movie Title</th> <th>Year of Release</th> <th>Movie Director</th> <th>Movie Lead Actor</th> <th>Movie Type</th> </tr> </table> EOD; //echo "$movie_header"; //LINE 38 $movie_details = '' ; while ($row = mysql_fetch_array($result)) { $movie_name = $row['movie_name']; $movie_director = $row['movie_director']; $movie_leadactor = $row['movie_leadactor']; $movie_details .=<<<DETAILS <tr> <td>$movie_name</td> <td>$movie_director</td> <td>$movie_leadactor</td> </tr> DETAILS; } $movie_details .=<<<EOD <tr> <td> </td> </tr> <tr> <td>Total :$num_movies Movies</td> </tr> EOD; $movie_footer = "</table>"; $movie =<<<MOVIE $movie_header $movie_details $movie_footer MOVIE; echo "There are $num_movies in the database"; echo $movie; ?>
-
That eliminated my parse error...and it was dumb, but the data from line 39 down is not displaying as I would expect it to. I know that the records are being read because the $echo "$num_movies"; variable on line 17 is returing the correct count.
-
Does anyone see why I am getting the following error in the code below? Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' on line 39 <?php include "config.php"; $link = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); mysql_select_db('test'); $query = "SELECT movie_name, movie_director, movie_leadactor " . "FROM movie"; $result = mysql_query($query, $link) or die (mysql_error()); $num_movies = mysql_num_rows($result); echo "$num_movies"; //LINE 20 $movie_header=<<<EOD <h2><center>Movie Review Database</center></h2> <table width="70%" border = "10" cellpadding="2" cellspeacing="2" align= "center"> <tr> <th>Movie Title</th> <th>Year of Release</th> <th>Movie Director</th> <th>Movie Lead Actor</th> <th>Movie Type</th> </tr> </table> EOD; echo "$movie_header" //LINE 38 $movie_details = '' ; while ($row = mysql_fetch_array($result)) { $movie_name = $row['movie_name']; $movie_director = $row['movie_director']; $movie_leadactor = $row['movie_leadactor']; $movie_details .=<<<EOD <tr> <td>$movie_name</td> <td>$movie_director</td> <td>$movie_leadactor</td> </tr> EOD; } $movie_details .=<<<EOD <tr> <td> </td> </tr> <tr> <td>Total :$num_movies Movies</td> </tr> EOD; ?>
-
Just in case anyone was looking, the error was on the last line of my sql insert. I had: "(8, 'Kids'), " . and I should have had "(8, 'Kids') " ; I'm quickly learning that PHP is very particular. Thanks for the help though.
-
no, i just have not posted it... the code is running...getting the "completed" confirmation, but it just isn't storing the data..
-
No error. Scirpt ran all the way through. Got the completed message at the end.
-
Hello all, I'm trying to run some script to populate a table that is already created. When I run the below code I am getting the completed message at the end, but my data is not going into my table....is there something incorrect with this code that is causing the issue? //make sure that we are using the right database mysql_select_db("test"); //insert data into "movietypeds table" $type = "INSERT INTO movietypeds (movietype_id, movietype_label) " . "VALUES (1, 'Sci Fi'), " . "(2, 'Drama'), " . "(3, 'Adventure'), " . "(4, 'War'), " . "(5, 'Comedy'), " . "(6, 'Horror'), " . "(7, 'Action'), " . "(8, 'Kids'), " . $results = mysql_query($type) or die(mysql_error()); echo "Completed"; ?> Thanks
-
Hello, I recently installed the XAMPP package on my computer and am confused on the set up of the config file. The installation went fine. All components are working. However, I now want to redirect the document root to a new folder and the httpd file in the apache-conf path does not control what page is loading. I can completely delete this file and it still loads as if I did nothing. Would someone be able to point me in the direction of where the index page should be? If I can at least find that I should be able to start figuring a little of this out. Thanks for the assistance. David
-
[!--quoteo(post=367881:date=Apr 24 2006, 02:17 AM:name=fenway)--][div class=\'quotetop\']QUOTE(fenway @ Apr 24 2006, 02:17 AM) [snapback]367881[/snapback][/div][div class=\'quotemain\'][!--quotec--] Not sure what you mean... MySQL only sets up mysql, users and test tables. If you lost mysql, you're in trouble, users you can recover, and test is just a playground. [/quote] Thanks for answering this. What i mean is that I am typing the command to show the tables in the database mysql. However, the command prompt is telling me that I don't have the permission to log in. Let me take one step even further back. I am changing my command prompt to mysql>. From here i am typing the command "Show Databases;" and I am getting Test and MySQL returned. Then when I want to see the tables in mysql i am getting the error that I am not authorized. I think I need to log in, but I don't know how... is that enough to help? Thanks?
-
Hello, I have recently been trying to learn PHP and MySQL with a help guide. I am now at a point in my manual that I need to get back into the default tables that were loaded with MySQL. I am being told that I don't have the permission, but for the life of me, I can't figure out how to acutally log in at the command prompt. Please help, Thank you,
-
I am new to using mySQL. I installed foxserv today and have been using my basic SQL skills to get around the sample databases that were installed with the .exe file. I am also using a beginner's guide that is suggesting if the install didn't place some .cnf files in my c:/mysql/directory then i shoud consider typing them in notepad and saving them there. My question is that I am using mySQL along with Apache. Should I place the my.cnf files in the root folder of Apache or should I place them at the highest level of the mysql "tree"? Thanks for the help? David
-
I am brand new to php and mysql. My company spends alot of money outsourcing simple projects that we should be able to do in house so I am trying to learn this application. I have downloaded the Foxserv AMP trio onto my machine and am working my way through a beginners guide. In this guide, the authors are suggesting that i test my mysql installation at the command prompt by looking for a sample db that was loaded in the installation process. i have copied the libmysql.dll file (originally called msql.dll) to the system32 folder. Now when i am at the command prompt and enter the following path: c:\foxser\mysql\examples\libmysqltest\mytest i am getting an error message that reads "The procedure entry point mysql_int could not be located in the dynamic link library libmysql.dll" Can someone please set me straight? Thank you David
-
hello everyone, I am brand new to php and mysql. I have developed some basic personal web pages in th past using FrontPage but nothing extremely complicated. I have purchased a beginner's and have begun looking through it, but am curious about the actual form development inside PHP. Can I use a tool such as frontpage or dreamweaver to create what i want and then somehow "connect it" to php and mysql or does everything ususally get created by me doing the coding myself?? Again, i know that this is a dumb question that I will look back on in 6 months and laugh at, but right now, i'm not laughing.