8,966 Posted Topics
Re: MySQL has the FIND_IN_SET() function, which allows you to search for a value in a column that has a CSV string. [code] SELECT * FROM authors WHERE FIND_IN_SET('reds', type) [/code] | |
Re: Use a variable. Increment it after you've used it. | |
Re: Not sure what you want to do, and where your problem lies. The only thing I can see from this code, is that line 25 is wrong. The <?php code tag in the echo will not work. You can do this: [code] echo '<input type = "checkbox" name = "num[]" … | |
Re: [url]http://www.daniweb.com/forums/thread236267.html[/url] | |
Re: [QUOTE=Atli;1078740]The [icode]<marquee>[/icode]tag is not a valid (X)HTML tag, which is why your IDE [I](Visual Studio, I assume)[/I] tells you it is not supported in XHTML. It's an old IE tag that was never accepted into the standards.[/QUOTE] As said before. No way to validate a marquee tag in XHTML. You … | |
Re: pg_fetch_all returns an array, so you should do: [code] $rows = pg_fetch_all($myresult); foreach ($rows as $row) { echo $row['misc.sp_archive.timestamp'] . "<br/>"; // echo $row['sp_archive.timestamp'] . "<br/>"; // it could be this line instead } [/code] | |
Re: I found [url=http://pajhome.org.uk/crypt/md5/advancedauth.html]this article[/url] an interesting read. Got some good ideas from it. | |
Re: You should read firstpos from $_GET['firstpos']; at the start of the page. If you want to keep your results without querying, then you need to add them to a $_SESSION variable. Personally I think it is better to re-query the database. | |
Re: [code] <?php if ($image == "none") echo "no image"; else echo '<img src="../images/' . $image . '"/>'; ?> [/code] | |
I noticed when pasting a wikipedia link containing parenthesis, that the bbcode url tag is not added correctly. The closing tag is before the closing parenthesis, instead of after. | |
Re: [code] echo "<tr><td>"; echo $row['car']; echo "</td><td>"; echo $row['caravan']; echo "</td><td>"; echo "<img src='images/" . $row['car'] . ".jpg' />"; echo "</td></tr>"; [/code] | |
Re: [code] SELECT customerID, date_of_sales, itemID, saleprice FROM sales s1 WHERE date_of_sales = (SELECT MAX(date_of_sales) FROM sales s2 WHERE s1.customerID = s2.customerID) [/code] | |
Re: Also, line 29 has an s and a double quote before the semi-colon, remove them. | |
Re: Just to give you an idea, I made this code once (output is here: [url]http://www.pritaeas.net/public/php/pagination/[/url]). $current is current page, $total is total pages, $enclose is how many to show next to the current page, $endpoint is used for showing the first and last N pages. [code] <html> <head> <style> .current … | |
Re: [url]http://www.daniweb.com/forums/thread186889.html[/url] | |
Re: Not really I think. Suppose he's doing this with cUrl, then there is a way to make you think it is just a browser. You can block him by IP or something, but that won't stop someone else from trying to do the same. | |
Re: You can use the readyState to wait for completion. See [url=http://www.daniweb.com/forums/thread282004.html]this thread[/url] for an example. | |
Re: What are you looking for ? An introduction in how to write settings to a file, read them and be able to change them ? | |
Re: First off. The FTP functions in PHP are server to server, and not client to server. Are you sure this is what you need ? Sounds to me you want to allow clients to upload to the server. If that is correct, then this is not a viable option. | |
Re: 'this' is an array, so 'this.length' returns the number of items in it. | |
Re: Can you show us what's in $insertSQL ? | |
Re: [code] sum := 0; i := 0; j := 0; while i < 10 do begin Inc(sum, i + j); Inc(i); Inc(j, 2); end; [/code] | |
![]() | Re: You can use a table, or use div's with css positioning. It depends a bit on what your page html looks like. What is your code ? |
Re: Does it output only one record, or do you see only one record, while there are more in your pagesource. The former would mean your query returns only one result, the latter would mean your html/css is probably incorrect. | |
Re: Confirmed. Not possible with PHP, as it is a server-side script. | |
Re: INSERT INTO does not have a WHERE clause, unless you are inserting from another table. | |
Re: Give some more information, or an example of what you are trying to do. | |
Re: To solve your problem in a generic way, I'd introduce a sort table containing your city and a sortorder column. Your query can then join this table and use it to sort it the way you want. This is also much easier if you want to change the sort order … | |
Re: Where does the 'see' option come from ? I cannot find a reference to it on the fancybox.net website. Do you have any more information ? | |
Re: Replace lines 36 through 39 with: [code] $name = mysql_real_escape_string($name, $conn); $query = "UPDATE nomsire SET show = $total WHERE name = '$name'"; mysql_query($query, $conn) or die(mysql_error()); [/code] | |
Re: mysql_query does not support multiple queries. You can use [url=http://php.net/manual/en/mysqli.multi-query.php]mysqli_multi_query[/url] instead. | |
Re: I tried to add one in Navicat, however I get a different error. It could be that you have no rights to create this, but it is hard to say. I'd contact Navicat support if I were you. Normally they are quite helpful. | |
Re: [icode]<?php//DATABASEN[/icode] does not work on my system. I have to use [icode]<?php //DATABASEN[/icode]. Note the extra space. Perhaps this causes your issue. | |
Re: [code] SELECT * FROM table WHERE column1 = 0 OR column1 = 20 -- or SELECT * FROM table WHERE column1 IN (0, 20) [/code] If your table holds records for both cases than they should be returned. Why do you think you only get the record where column1 is … | |
Re: Try mousemove instead of onmousemove. | |
Re: Broken link, try this one: [url]http://en.wikipedia.org/wiki/Design_pattern_(computer_science)[/url] Here is another one: [url]http://en.wikipedia.org/wiki/Gang_of_Four_(software)[/url] | |
Re: Not sure that is possible in one go. I think you can use preg_replace_callback. Search for all 0 parts, and use the callback to determine their length and return either the same value (>= 5) or a replacement with 1's. | |
Re: The mysql_query does not know what database to perform the action on. [code] $link = mysql_connect('host', 'username', 'pass'); mysql_select_db('database'); $u = "UPDATE Profile SET Image = '$f' WHERE Forum = '$p'"; mysql_query($u, $link); [/code] | |
Re: You query should look like this: [code] SELECT * FROM PRODUCTS WHERE PR_SKU in ('PROF','45','48','49','4','3','11') AND PRODUCTS.PR_IsInactive=0 [/code] That would mean that you need the following code: [code] $RecProd=$row_Rs_recProd['PR_UpSales']; $in_array = explode(',', $RecProd); $RecProd= "('" . implode("','", $RecProd) . "')"; [/code] | |
Re: [url]http://www.delphibasics.co.uk/RTL.asp?Name=Format[/url] | |
Re: Read up on [url=http://php.net/manual/en/curl.examples-basic.php]cUrl[/url]. | |
Re: Your __construct function would have to include those parameters. Then within it you can call the parent's constructor: [code] function __construct($wheels, $engineType, $engineSize, $color, $sidecar, $handlebars) { parent::__construct($wheels, $engineType, $engineSize, $color); $this->sidecar = $sidecar; $this->handlebars = $handlebars; } [/code] | |
Re: In a normalized database the tags would have their own (link-)table. It depends on how you want to retrieve your data. It is possible to build a query in code that will return your result. Doing it in a single query would be very difficult. For a single category you … | |
Re: All info [url=http://api.jquery.com/]here[/url] | |
Re: 10061 means connection refused. Are you sure mysql is running ? Perhaps a firewall won't let you connect. It can be a number of things. | |
Re: [code] $(document).ready(function() { $("#first").load("first.php?id="+ Math.random(), function(){ $("#second").load("second.php?id="+ Math.random()); }); }); [/code] | |
Re: Looks like you're outputting html, so you can just use a <br/> | |
Re: Remove the double quotes. It expects a variable containing a resource, not a string. | |
Re: If you have MS SQL Server Management Studio installed, then you can right-click your table and select "Script Table As" and then "Create To". Am not sure if this is possible for data. |
The End.