-
Posts
6,906 -
Joined
-
Last visited
-
Days Won
99
Everything posted by ginerjm
-
assign the query string to a variable and then echo that var for us
-
Do you have error checking turned on? I dont' see it here.
-
Timing out script - nearly there but missing something!
ginerjm replied to listerdl's topic in PHP Coding Help
Looks confusing but apparently it looks better to you. You'll get it. -
Can we see the query statement?
-
Really? Debugging. The practice of putting echo statements in sections of your code so you can check what has happened. Echo $var; Echo "Got to this point". etc.
-
Timing out script - nearly there but missing something!
ginerjm replied to listerdl's topic in PHP Coding Help
Get the current date/time. When you are building your output, compare the date/time value you are thinking of outputting to the current d/t. If it is what you want to show, then show it. And repeat with the next date/time value you have. No? So now you need to learn some php. The manual has plenty of info on managing dates and datetimes. -
Timing out script - nearly there but missing something!
ginerjm replied to listerdl's topic in PHP Coding Help
I don't know what you are doing. You want to "not display" a past date. What's the difficulty with that? -
Plain old debugging methods then. Put some echos thru your code to see where it goes and make sure it is doing what you think it's supposed to do.
-
Do you get the rest of the echo statement?
-
Timing out script - nearly there but missing something!
ginerjm replied to listerdl's topic in PHP Coding Help
What exactly is "It" that dies/goes away? Something on a page? Something in a table? What is "it"? -
None from me. I have no idea what you are doing, nor why you are trying. Seems like a waster of time.
-
What errors?
-
Huh?
-
Are you saying you want to create an excel sheet? By displaying comma-separated text on a page with those headers (of which I know nothing about)? Can one do that? Have you looked closely at the data that you generated to ensure it is correctly formatted. Did you remove the trailing comma from the header row? Looking to learn from this exercise of yours. Of course, if this is a sometimes-exercise, can't you just save the file on the server in an accessible folder and then use an ftp client to bring it to your pc and manually import into excel?
-
Allow me to vent: Why would you EVER want to do that? Done. Databases/tables are meant to store data in a meaningful and easily retrievable way. MySQL is a pretty efficient db. Of course you should create a column for each piece of data and store the data pieces in those columns. If you did this thing you propose, how would you ever locate specific items of information without pulling down ALL the rows, exploding each of them and searching through the resulting arrays. That doesn't sound very efficient does it?
-
If statement and Header Location problem
ginerjm replied to learningphpisfun's topic in PHP Coding Help
Your problem is here: if($hats == 0); header("Location:outofstock.php"); Too many semis. format of if statement is: if (conditions) { statement; (statement;).... } else { statement; (statement;).... } -
Not sure what you are asking. Are you proposing to make a comma-separated string and inserting all the data into one column of a table?
-
Specifically - it's not the redirect that is failing you, is it? It is the series of tests you are making. Why not echo them all out and see what you have? That would be the best thing to show us to get help with.
-
If you are talking about one of the many pages you have set up I'm guessing you are presenting the user with a blank poll page, he answers your questions and submits it, you process his votes, add them to your database and want to return a page showing the total vote counts for the topics on that page. Yes? So in the part where you display the questions and the vote input tags do this: On the first pass (voting pass) show the question and input tags but don't show the fields interspersed among the questions that will show the vote totals. On the second pass (after doing a db update and a query to get the new totals) show the questions again and this time also output the voting results after each question. No?
-
So - does it work now?
-
MOUSE SCROLLING WEHN USING THIS PHP CODE. (VERSION 2)
ginerjm replied to rleahong's topic in PHP Coding Help
OP: Something I just have to ask. Whatever do you MEAN when you say "the mouse is scrolling"? Could it be that your code is just generating so much data that your page is just spitting out line after line after line? trq: love that link! -
Have no idea what you are saying.
-
$q = "update into table (...) values(...)"; $qresults = MySQL_query($q); if (!$qresults) { echo "Error occurred in my query - message is ".MySQL_error()"; exit(); } This is good programming practice.