217 Posted Topics
Re: [QUOTE=anthmaina]how do you implement match making using php/mysql?[/QUOTE] I suggest you ask a more specific question. For example, you could ask "I have 2 mysql database tables. One contains basic contact data for the people. The other table has the properties for the people such as 'smoker','loves dogs','college degree', etc. … | |
Re: The best I can gather from the documentation is that "signed" or "unsigned" refers to the plus or minus sign a person would traditionally use to indicate a positive or negative value. So an UNSIGNED numeric value can never be negative. Therefore, if you have a column that you want … | |
Re: martinkorner, I think you've been given some confusing help. Not incorrect help, just confusing. From your posts, it is evident that you are not a PHP programmer and probably not even familiar with server-side web-development. So I think the examples shown you would simply confuse you. One thing, the advice … | |
Re: [PHP] $tomorrow = date('Y-m-d',mktime(0,0,0,date('m'), date('d')+1, date('Y'))); [/PHP] | |
Re: You may find this document helpful. [url]http://www.troywolf.com/articles/wamp_howto.htm[/url] No need to install on seperate partitions or anything. Apache is not an operating system--it's just a program that is a web server. If you want to install on a seperate partition--no problem as long as Windows can read the partition. IIS and … | |
Re: Don't fool yourself into thinking that you are going to find tidy pre-packaged scripts that fit nicely into your application. From what you've described, you want to develop a custom online music database/streaming service. This is an aggressive project for someone obviously just beginning to learn Internet and database programming. … | |
Re: Although you can store large binary data blobs (such as MP3s) in a database, I recommend you store the media files as normal files in the filesystem. Use the database to store meta data--that is data about the media files, but not the media files themselves. | |
Re: You must wrap string literals within single quotes. You also have some extraneous parenthesis in your query. Try this: [PHP]$query ="SELECT *" ." FROM ".$SQL_COUNTTABLE ." WHERE SC_REFERENCE LIKE '".$REFERENCE."'" ." AND SC_NAME LIKE '".$COUNTERNAME."'" ." AND SC_SINCE = '".$DELOLDTIME."'";[/PHP] This query should execute--assuming those are legitimate column names and … | |
Re: [QUOTE=martinkorner]I've just started with PHP and want to be able to test my PHP scripts without having to put them on the internet first. Is there something which requires virtually no setup and will let me use my PHP scripts?[/QUOTE] Check out my WAMP HOWTO at [url]http://www.troywolf.com/articles/wamp_howto.htm[/url]. It's a bit … | |
Re: I'm a nice guy, but I got to say, RTFM. The code examples in the PHP documentation are VERY good. It is unlikely that anyone here is going to explain it more simply than the PHP documentation. You did not mention what database you want to use, but lets assume … | |
Re: What is your question? Please state a specific PHP-related question. | |
Re: Password protection can be tackled a lot of different ways and they depend on: [list] [*]Which OS (windows? linux?) [*]Which webserver (IIS? Apache?) [*]Do you have admin privs on the server? [*]Do you only need to protect scripts or all files? [*]What scripting languages are available to you? (ASP?, ASP.NET?, … | |
Re: MySQL does not have a direct function to produce this, but you may find the RAND() function helpful. Find RAND() on this page: [url="http://dev.mysql.com/doc/refman/4.1/en/mathematical-functions.html"]http://dev.mysql.com/doc/refman/4.1/en/mathematical-functions.html[/url] You could do something like this: [CODE]select ROUND(RAND() * 123456789) as id[/CODE] The larger you make the number, the larger your id. No guarantees about uniqueness … | |
Re: To handle the content switching, I recommend you look into AJAX. This means using the javascript XmlHttpRequest object. There are a few popular AJAX function libraries out there to make it easier. I recommend the excellent one from Yahoo. Check out Yahoo's UI Library. [url]http://developer.yahoo.com/yui/index.html[/url] Specifically, you want the Connection … | |
Re: You may also find my post at [url]http://www.daniweb.com/techtalkforums/showthread.php?t=40834&highlight=client-side+javascript+PHP[/url] helpful in understanding at a high level the difference between client-side and server-side scripting. | |
Re: Concerning your IIS trouble... you say it was working then unexpectedly stopped working. Probably your easiest route is to get that working again. Can you browse to [url="http://localhost"]http://localhost[/url] and see any files? If you create a default.htm or index.htm in your wwwroot folder, do you see it? If not, your … | |
Re: You are creating both the dir and the file with permissions 755. This means that the owner ('nobody' in this case) can execute, write, & read. Everybody else can execute and read, but not write. Apparently, your own user account is not a super-user (root privs). To delete the files, … | |
Re: First of all, my WAMP HOWTO explains STEP BY STEP how to install Apache, MySQL, MySQL and phpMyAdmin on Windows. [url]http://www.troywolf.com/articles[/url] Installers are great until there is something you want to customize about the installation--which for most people is not an issue. The other "problem" with installers is that they … | |
Re: I think you'll find my [url="http://www.troywolf.com/articles/wamp_howto.htm"]WAMP HOWTO[/url] answers most of those questions. It is complete with PHP code examples to connect to your database. | |
Re: Thank you for posting to Daniweb! For future post in this forum and any forum, I recommend you create a title that succinctly describes your issue or question. "help!" doesn't do it. :) But....here I am helping...so I guess it did work, eh? Well, your question is really a lot … | |
Re: The yellow triangle you refer to means the page has a javascript error. An error in the webpage is not your fault, it is the fault of the person who created the page. A javascript error is nothing for you to worry about unless: [list=1] [*]It's your website [*]It breaks … | |
Re: Paradox, his question is clear enough I think. His point is that you can't simply double-click a PHP file on your local disk and expect it to pop open and run in the browser---like you would an HTML page. Sam, you are on the right track--you can only test PHP … | |
Re: All you can do is prompt the user to set their browser to print the document landscape. They can do this in all the popular browsers using the File/Page Setup menu. I know you'd like to control it from the web app--to force it to print landscape. There is not … | |
Re: I fixed all the obvious problems I found (there were several). [CODE] var message="Function Disabled!"; function clickIE() { if (document.all) { alert(message); return false; } } function clickNS(e) { if (document.layers||(document.getElementById&&!document.all)) { if (e.which==1||e.which==2||e.which==3) { alert(message); return false; } } } if (document.layers) { document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS; } else { document.onmouseup=clickNS; … | |
Re: Here is a Daniweb thread where I show a code example to connect to a mysql db, select a db, create a query, execute it, and work with the resulting data. [url]http://www.daniweb.com/techtalkforums/showthread.php?t=25316&highlight=mysql_connect[/url] There are a LOT of threads here on Daniweb in the PHP forum that will show you similar … | |
Re: The error you describe sounds like it results from the [url="http://www.php.net/manual/en/function.mysql-select-db.php"]mysql_select_db()[/url] function. If that's the case, am I to assume your [url="http://www.php.net/manual/en/function.mysql-connect.php"]mysql_connect()[/url] statement did not fail? You specify the hostname, username, and password with the mysql_connect function. If that did not produce an error, then your account does exist and … | |
Re: I am running MySQL version 3.23.58. I copied and pasted your CREATE statement into a query window and executed it. It created the table successfully. I don't KNOW what the problem is for you, but you might try changing BOOL to TINYINT(1). In my version, BOOL is not valid, however, … | |
Re: You posted in the PHP forum and mention the app is a PHP app. However, I cannot assume that the link text is being placed by PHP code--so I must ask. Are the "Place Ad" links conditionally displayed using PHP code? Or are they simple HTML that should always appear? … | |
Re: What you describe is possible and not even very complicated for a javscript programmer. If you want to take a stab at it yourself, there are plenty of javascript cookie examples on the net. Some simple searching for "javascript" and "cookies" will get you some code to play with. Since … | |
Re: The problem is exactly what the error message states. The resource is not a valid MySql resource. This is because the query is invalid or not producing any data. Instead of building your SQL statement inside the mysql_query statement directly, build it in a variable then use that variable in … | |
Re: [QUOTE=ridhimasatam]Hi, Please guide me on brief details of HTML,PHP,CGI(Common Gateway Interface) and the difference between them.[/QUOTE] Obviously there are numerous people on Daniweb who can answer your questions. But why bother posting questions in a forum for something you can figure out yourself with a simple search engine query? Help … | |
Re: Kudos to Esopo for such a thorough reply, excellent explanation of the issue, and even code to solve the problem! I do my development with Firefox because I love the javascript tool for viewing the script errors. After adding much script or CSS, I stop and check in IE as … | |
Re: What version of MySql? 4.1 and newer support subqueries. If your version support subqueries, you can do something like this: [CODE] select * from mytable where a = 147 and id not in (select b from mytable) [/CODE] Otherwise, try this: [CODE] select t1.* from mytable t1 LEFT JOIN mytable … | |
Re: I'd like to add that Apache is also very stable on Windows and many websites use Apache and PHP on Windows to serve their websites. However, Apache and PHP are native on Linux. If you are starting your webmaster journey, I recommend you stick to the LAMP architecture that csgal … | |
Re: [QUOTE=ridhimasatam]HI, i want to know what is server scripting ,and how does php relates to server scripting.[/QUOTE] csgal is correct, but based on your question, I'm thinking you may need an even higher-level answer? If not, just ignore this post! ;) When you browse the web, you do so with … | |
Re: I've looked into this "issue" myself a few times. First, I've been doing this long enough to vouch that you really do want to specificy exact columns. I only use '*' in my quick & dirty test code. To my knowledge there is not any way to do exactly what … | |
Re: [QUOTE=acl]I am the webmaster for a site hosted by ipowerweb.com....Bear in mind that I know nothing about html.[/QUOTE]Huh?! I have to agree with Phaelax on this one. Please explain how you are a "webmaster", acl. :) | |
Re: Comatose is correct. Here is more detail. [CODE] <script type="text/javascript"> function ElementContent(id,content) { document.getElementById(id).value = content; } </script> <textarea id="ta1"> </textarea> <button value="Click Me!" onclick="ElementContent('ta1','Hey, it works.')" />[/CODE] | |
Re: For simply comparing 2 lists of words for matches, I'd leave the database out of it. You can store your results or the keywords in the database if you want, but for the actual comparison, check out PHP's [b]array_diff()[/b] function. [url="http://www.php.net/manual/en/function.array-diff.php"]http://www.php.net/manual/en/function.array-diff.php[/url] PS: For the part where you retrieve the headers … | |
Re: It's called a "Cartesian product". Mathematical explanation: [url="http://en.wikipedia.org/wiki/Cartesian_product"]http://en.wikipedia.org/wiki/Cartesian_product[/url] SQL explanation: [url="http://www.fluffycat.com/SQL/Cartesian-Joins/"]http://www.fluffycat.com/SQL/Cartesian-Joins/[/url] Try this: --------------------------------------------------- SELECT p.id , p.name , p.surname , p.email , c.start AS beginning , c.end AS finnish , c.name AS title , c.event AS description , c.id AS eventid FROM calendar c INNER JOIN attendance a ON … | |
Re: This is an "issue" I've visited many times. Unfortunately, formatting HTML to be viewed in a web page that will print exactly the way you want is near impossible---you aren't allowed that kind of control over the formatting with HTML. With CSS, you can insert page breaks. [url="http://www.w3.org/TR/REC-CSS2/page.html"]http://www.w3.org/TR/REC-CSS2/page.html[/url] The other … | |
Re: I'm not exactly sure what you mean by "running the query through XML". I understand that MSSQL Server has an XML method to query--so maybe you are using that....in any case.... The query you show is a valid MSSQL query--I don't see any problems with the query itself. Do you … | |
![]() | Re: All I can do is expand on what ammcom already told you. Do something like this: [PHP] if (!$dbh = mysql_connect ("localhost", "myusername", "mypassword")) { die ('I cannot connect to the database because: ' . mysql_error()); } if (!$ret = mysql_select_db ("ababoc_filmlistings")) { die("db selection failed: ".$mysql_error()); } $sql = … |
Re: I always use the exec() function instead of system(). I'm not sure what's different about them. [url]http://www.php.net/manual/en/function.exec.php[/url] The most likely problem is that the user account that the webserver is running as does not have privs to execute the command or script. For example, since my Apache webserver runs as … | |
Re: I'm trying to figure out exactly what you want to do and what is not working. So you have a hosting account on a server that provides you with a MySql database and the popular PHP application "phpMyAdmin" for database administration. So we have to assume that your hosting company … | |
Re: I'm not sure I understand your goal, but it appears that when a user submits the form, you don't want the form to submit anywhere--instead you want to display the values from the form at the bottom of the page--one per line? From your code: [PHP]document.write(form.elements[count].value +"<br />");[/PHP] If that's … | |
Re: I consider myself an expert javascript coder, but when I need help, I turn to Matt Kruse. Matt offers many excellent javascript libraries. He has an excellent select box library to do exactly what you want. I use it all the time. [url]http://www.javascripttoolbox.com/lib/selectbox/examples.php[/url] | |
Re: Let me preface this by saying, I'm not a MySQL DBA. I do have a lot of experience, though. In your phpMyAdmin conf file (config.inc.php), have you specified "root" as the user? Your "root" user should have all privs. Did you modify the root user's privs? I'm not even sure … | |
Re: Welcome to a long frustrating journey! ;) Seriously, it is obvious you are just starting this journey so expect a lot of struggling. But soon, it will all come together--just keep pushing forward and learning. First of all, PHP is not only a web development language. You can use PHP … |
The End.