8,966 Posted Topics
Re: Depends on the result you are looking for [code] SELECT * FROM bank_wire bw, visa v WHERE bw.id = 1 AND bw.id = v.id AND bw.checked = 1 AND v.checked = 1 //or SELECT * FROM bank_wire WHERE id=1 AND checked=1 UNION SELECT * FROM visa WHERE id=1 AND checked=1 … | |
Re: Line 50 is missing a comma. | |
Re: I think the problem is that you try to fetch the result from an insert query. This is not possible. As you can read on php.net/mysql_query: "For other type of SQL statements, INSERT, UPDATE, DELETE, DROP, etc, mysql_query() returns TRUE on success or FALSE on error." Concluding: mysql_fetch_array($result1) is not … ![]() | |
Re: You get the first hidden in your click event, because you repeat the same selector. What you can do is: [code] $("tr[class='click']").click(function(){ var a = $(this).find('input:hidden').val(); alert(a); }); [/code] What it does is start from this (the row you clicked on), and then find the next hidden from there. Note … | |
Re: To expand/collapse you can inject some javascript or jquery. Do you already have your html file ? Do you want to collapse all nodes ? | |
Re: According to the error message your query return false, which indicates failure. Are you sure you've copied your database and tables, and created the same user ? | |
Re: You output html, so using spaces won't have the desired effect, unless you use the <pre> tag. For newlines, you need to add <br/> tags. | |
Re: When you create a new patient-id you can also join today's date with the number of id's starting with that date already in your table. If there are no records for today yet, the count will be zero. | |
Re: [code] $data = "$numrows, $numrows1"; [/code] | |
Re: if the part you want to add is the same (after the words) then I think you can use preg_replace, something like this: [code] $subject = 'Some word search'; $result = preg_replace('%(\w+)( )(/w+)*%m', '$1 asdf $3', $subject); [/code] | |
Re: Why not use the MySql REPLACE() command in your query: [code] SELECT *, REPLACE(vcity, ' ', '-') AS vcity_replaced FROM table WHERE vcity = '$this->vcity' AND sch_date >= '$this->sch_date' ORDER BY timestmp ASC [/code] It might be possible to do in your htaccess, but that would require a regex that … | |
Re: You get the error because the query returns an error. Echo a particular query and try it in phpMyAdmin or something similar, see what it outputs, perhaps the quote around your table are messing it up. | |
Re: Disregard the comment from mayuri_desh. You regex is missing something. You should check that your text is not enclosed within a tag. But I am not sure what would be the best method for this, possibly a negative lookbehind. You can read about it here: [url]http://www.regular-expressions.info/lookaround.html[/url] (If I can find … | |
Re: [url]http://www.cssplay.co.uk/menu/solar_map[/url] | |
Re: You should create a template that can be called recursively to display all nodes within a node. | |
Re: Not entirely sure if this will work, but maybe you can check the referer and hide the div's if it is somewebsite.com | |
Re: If you return $tsk from your function, then you can merge it with the previous one. | |
Re: The separate parts are probably not that difficult. There are a lot of samples on this site on how to traverse a folder in php. Personally, I use phpThumb for thumbnail sizing and caching. The next problem is probably, what are you going to do with it ? Does it … | |
Re: Not sure whether it would help your case, but since you're using AND's: the best way would be to put the most restrictive one in front. To clarify: [code] SELECT * FROM table WHERE true AND false SELECT * FROM table WHERE false AND true [/code] The second query would … | |
Re: You should start putting names in the first td, until you hit N. Then switch to the second. Add br tags after the names. | |
Re: You'd need a cms that will allow user roles to be specified for specific (sub)pages. AFAIK only large packages have such functionality, and those do not play well with your Keep It Simple requirements. Probably the best course of action would be to have one built. I've seen more threads … | |
Re: What did not work ? Give an example of what you want to happen, and what does happen. Did you get an error ? | |
Re: A database trigger cannot execute PHP code, only SQL statements. | |
Re: You should use success: instead of complete: to retrieve the data. Success returns the data, whereas complete is a status notification. Read more here: [url]http://api.jquery.com/jQuery.ajax/[/url] | |
Re: Is there a specific reason you want to do it with PHP ? If you use a shell script it can be as small as this: [code] #!/bin/sh DATE=`/bin/date +"%G%m%d"` ; mysqldump --host=localhost --user=YOURUSER --password=YOURPASSWORD --all-databases --single-transaction --quick | gzip > ./YOURFILEPATH/backup-$DATE.sql.gz ; [/code] | |
Re: Hard to tell from a single line, normally it would mean that $settings = new SettingsClass() was missing. | |
Re: Are you referring to a custom function in PHP or the SUM() function in MySql ? | |
Re: Check your php.ini file to see if it is enabled, you can find how here: [url]http://www.daniweb.com/forums/thread41405.html[/url] | |
Re: [QUOTE=gazzy1;1262949]please solve my assignement i am waiting[/QUOTE] We're not here to do your assignments. We will help you if you run into trouble. When you get stuck, post your code and/or errors here with an explanation. ![]() | |
Re: Am wondering, wouldn't it be easier to match .jpg (optionally followed by a question mark and some chars) and replace it with _silly.jpg (and any other filetype you use) ? [code] var src = $(this).attr("src"); src = src.replace(/^(.*)(\.jpg)(\?.*)?$/mg, "$1_silly$2$3"); [/code] | |
Re: Not sure how you're database looks, but you could add a unique index on the date column and the stock id. | |
Re: First thing I notice is "stmp.gmail.com". This should be "smtp.gmail.com". | |
Re: You are exporting a tab separated file, there is no way to add excel formatting to it. Something like this may do the trick: [url]http://phpexcel.codeplex.com/[/url] | |
Re: For one, your PHP code does not return anything. You should construct an array of all your results and echo them with json_encode() or just output HTML. Second. Your success function does not contain a data parameter. You can use this to access the returned json or html and output … | |
Re: That is because javascript is a client side language. If you use for example php on your server, you can use exec() to run something serverside. ([url]http://php.net/exec[/url]). Every server script/language has a way to do it. | |
Re: Wouldn't that be the orderitem table, where you sum the quantities for each distinct product, and order that descending ? Something like this perhaps, I have no relevant table to test with: [code] SELECT productid,SUM(quantity) AS total FROM orderitemtable GROUP BY productid ORDER BY total DESC [/code] | |
Re: That is not what distinct does. Distinct will show every value once. What you want is to output the bid that is only once in the table. Something like: [code] SELECT `bids` FROM `tbl_bids` GROUP BY `bids` HAVING COUNT(1) = 1 ORDER BY `bids` ASC [/code] | |
Re: You mean something like this ? [url]http://www.zubrag.com/scripts/website-thumbnail-generator.php[/url] [url]http://www.shrinktheweb.com/[/url] | |
Re: [code] $value = preg_replace('/.*\|(\d+)=.*/m', '$1', $value); [/code] | |
Re: [code] result = subject.replace(/.*<title>(.*?)<\/title>.*/ig, "$1"); [/code] | |
Re: The select has the same name as your hidden input... That's what's messing it up. | |
Re: How is your site organized ? Do you use PHP/MySql or just plain HTML files ? What do you want to search ? What results do you expect ? | |
Re: You could do the following, provided the image contains only the triangle, and not the text: [code] li.topnav-current-page:hover { background: url(images/about_example.gif) bottom left no-repeat; } [/code] | |
Re: Apparantly you need to provide a password to connect to mysql. It is missing on line 2. | |
Re: You need to remove any single quotes within the string or escape them with a backslash. | |
Re: [code] RewriteRule ^index\.php?id=(.*?)&idk=(.*?)&idv=(.*?)&idp=(.*?)$ $2/$3/$4 [L] [/code] This one should work, given all the parameters are there, in that order. Hope this will get you started. | |
Re: Correct in part. This will add the comma's, however you still need quotes around the values. You could try: [code] $sql = "insert into customer values ('". implode("','", $arr) ."')"; [/code] | |
The End.