ManiacDan
Staff Alumni-
Posts
2,604 -
Joined
-
Last visited
-
Days Won
10
Everything posted by ManiacDan
-
MySQL's full-text searching feature may be of interest to you. Warning, it's very complicated. If you need to be told how to set up your table for a simple LIKE match, match...against will be beyond your skill level at the moment. Bookmark the URL though. -Dan
-
AbraCadaver is doing it the way I would. There may be a faster way, but this is good enough. -Dan
-
Such responses make me sad. You were told "quote" twice, and you kept counting the values.
-
Yeah, that's too much code (that's poorly written and indented) for me to slog through. If it's such an enormous problem, you can pay someone to do it. Something in that file causes the message to be split. Substr, preg_split, and a couple other functions will split a string. There's a constant called MAX_MESG_LEN, but it's set to 6000000 characters. I don't think that's what's biting you.
-
Yes, but it's not a "do it for you" forum. You're missing a quote in your "VALUES()" section. It should be very easy to spot, since the location is hinted at in your error message and we've told you exactly what to look for.
-
Form action attribute submits to remote website
ManiacDan replied to brianlange's topic in PHP Coding Help
Are you double-clicking the button? -
You want a beginning AND END increment, and you want this in its own table: item_id, start_increment, end_increment, price_per_unit That way you can say: SELECT item.item_id, item.name, price_per_unit FROM item JOIN item_pricing USING( item_id ) WHERE $quantity BETWEEN start_increment AND end_increment Ta-da. -Dan
-
Yep, I see it too. It's quote related...
-
You would have to...look at the code. Right now, all we can say is "the code is doing that."
-
Ah yes, well, the right word does tend to aid a web search ;-)
-
It's possible they were simply saying "we have a database administration team." A "SQL Delegate" could simply be someone you ask to write your SQL for you. -Dan
-
Adding categories to a new ecommerce site [was: help plzzz]
ManiacDan replied to maestrotg's topic in Applications
maestrotg, we try to be nice and helpful, but I honestly gave you all the information you need to do this if you have enough PHP skill to warrant the attempt. If you don't actually have enough PHP skill to start this project, then (as thorpe mentioned) you need to learn PHP. Start small. I already suggested simply making a "category" page on your website that allows someone to simply VIEW the contents of the "category" table. Do that. When you're done, make a "cross-reference" table linking items to categories, then try to figure out how to take your "view categories" page and make the categories clickable links to view the items in the categories. Read that article about help vampires as well. We can't give you more and more specific advice until code starts to appear. We don't get paid to do this. @chaseman (and whoever else cares): I'm a mod at DevShed forums as well, though I've abandoned my other modship due to time constraints. Nilpo (the super-mod of devshed) has started a new forum recently that he's offered me a mod spot at, but it's not really taking off like it should. Probably because we're all ignoring it. -Dan -
Adding categories to a new ecommerce site [was: help plzzz]
ManiacDan replied to maestrotg's topic in Applications
Sorry, I forgot a step. 1) Learn PHP. Enjoy your stay at other forums, I'm a mod at the other 2 largest PHP forums, I'm sure I'll see you around. TRY something first, then come back to tell us where you're stuck. You are, at this point a help vampire. Saying "I don't know PHP and I don't want to even try to learn, plzzzzzzzz help me" translates into "do it for me." We've been on forums too long not to recognize that. If you think you're willing to try it yourself, prove it. Make some tables and show them to us. Read up on how to properly categorize a PHP site. Try to make a category table and a PHP page that shows all the categories. You don't need very much skill for that, "category" is not a special concept. -Dan -
Hyde, it's not joining any table to itself, it's joining 3 tables with the same prefix. This is a cross-post by the same user from devshed, so I'm closing this topic. Conversation can continue over there. -Dan
-
PHP Function problem - article not found.
ManiacDan replied to Hangwire's topic in Apache HTTP Server
1) Don't bump AT ALL, it's against the rules. Especially don't bump when it's before breakfast time in the United States. 2) You're purposefully not giving us all the information in order to...what? Is this some kind of test where whoever figures out that you're randomly paraphrasing basic apache error messages becomes the next Highlander? Give the error next time and we won't have to BEG you for enough information to fix your problem. None of us assumed that you were getting a 404 message. Do you know why? Because you said "PHP is giving me <this error>" and then you pasted a bunch of unrelated PHP code. Apache is giving you a 404. You knew this the whole time, yet you posted in the PHP forum and included snippets of random PHP code. Yes, this turns out to be an apache error. It took you 12 posts to actually say that, and now this is in the apache section. However, this is a very easy error. The file isn't where you think it is. Move the file, or change your URL, and then you'll get to see all your PHP errors. PHP isn't being hit because apache cannot find the object. The object, in this instance, is the page you're trying to actually run. -Dan -
Adding categories to a new ecommerce site [was: help plzzz]
ManiacDan replied to maestrotg's topic in Applications
Adding categories to your site involves: 1) Creating category tables (at least one, probably 2 or more) 2) If you only made one table in (1), adding a category_id field to whichever table holds the items to be categorized 3) Add a site section for displaying these categories. 4) Add a box for displaying the active category/categories on the page that displays your items 5) Add code into pages on 3&4 to power that site content It's a complicated process. However, categories are just like any other item property. Just like you added the Title for these articles (or whatever), add a field for Category. You SHOULD make category its own table, but that's the only "gotcha" in this process. -Dan -
I see a missing semicolon. I don't see any debug information. Are you sure these accountsettings lines are pulling valid data? -Dan
-
haha wtf, why is this like this? If you're the one outputting this list, then just fix the output function. Otherwise, this preg_match_all line will fill $foo[1] with all the IDs, and $foo[2] with all the names of the list items: preg_match_all("/id=\d+_tab\d+_\[(\d+)\]>(\w+)/", $string, $foo); Using that, you can loop through and make sure your'e not repeating an ID. You could also simply loop through $foo[2] and print out a new list with sequential IDs. -Dan
-
Adding categories to a new ecommerce site [was: help plzzz]
ManiacDan replied to maestrotg's topic in Applications
Welcome to the site. Please take a minute to read the forum rules, your topic was unhelpful and your post contained URLs and emails. That being said, you may simply want to look into an ecommerce CMS. If you're just trying to get a website with categories, then download oscommerce or something and you'll be ok. Otherwise, you'll have to TRY this, and come back to us when you get stuck. -
January 1, 1970 is "zero time," that's when the Unix epoch began. Any invalid date math comes out to that date. You keep saying you're manipulating the date...but I haven't actually seen any date functions in any of your code. m/d/Y is ambiguous, because europeans use m/d/y. You can switch to a datepicker that returns data in Y-m-d, that may help. Standard debugging steps apply here. Echo what you have. Run strtotime. Echo what that gives you. etc. echo date("Y-m-d", strtotime("1980-03-14") + (60*60*24*120)); //outputs: 1980-07-12 -Dan
-
PHP Function problem - article not found.
ManiacDan replied to Hangwire's topic in Apache HTTP Server
1) We're programmers, not farmers. Don't bump at 7am. 2) That error STILL doesn't appear in the code you're giving us. What, exactly, is giving you that error? Is it on the screen? In a modal dialog? In a log file? What, exactly, is the actual error? Are you honestly just seeing "object not found" show up by itself with no other information somewhere? 3) Don't include a file within a function, it's bad form and imports a bunch of unnecessary variables into a local scope that will just be destroyed. -Dan -
PHP Function problem - article not found.
ManiacDan replied to Hangwire's topic in Apache HTTP Server
The error message you posted doesn't appear in this code. All this code you gave us is for fetching an article's COMMENTS, not the article itself. Look in your code for the error message you're seeing. That will give you a place to start. -Dan -
Bradley, that won't work, date() outputs a string. Ryan, what you want is to use the SECOND argument to date, which is a timestamp: date('Y-m-d H:i:s', strtotime('+4 hours')); //or date('Y-m-d H:i:s', time()+14400); -Dan
-
If you're using PHP 5.3, you may also be interested in the date interval class. Also, if you're using stripslashes, you're doing something wrong. Stripslashes is only necessary if you have magic_quotes turned on, and that is widely considered to be bad practice. -Dan
-
Note that the groupPeople function can be replaced with implode().