Search found 11 matches

by RealTuty
Sun Apr 01, 2012 5:16 am
Forum: PHP
Topic: PHP MySQL Select Query
Replies: 2
Views: 466

PHP MySQL Select Query

I am getting [syntax=php]Resource id #7[/syntax] from this query while i am trying to select the posts. [syntax=php] $email = mysql_real_escape_string($email); $r = array(); $r = mysql_query("SELECT id AS id, url AS url, url_key AS url_key, date AS date, email AS email FROM urls WHERE email = '...
by RealTuty
Fri Feb 03, 2012 4:13 pm
Forum: Tutorials
Topic: Dev API
Replies: 3
Views: 618

Re: Dev API

Ok so i put [syntax=php]echo "{$head}{$post}";[/syntax] above the frwite() and got this [syntax=text]POST = /r2/api/a.php HTTP/1.0 Host: localhost Content-Type: multipart/form-data; boundary="8376698c1a6bf3046e88ba60fbb2cff0" Content-Length: 126 Connection: close --8376698c1a6bf3...
by RealTuty
Sun Jan 29, 2012 6:03 pm
Forum: Tutorials
Topic: Dev API
Replies: 3
Views: 618

Dev API

Ok so now i have a problem with the dev api tut here is my code [syntax=php] <?php class url_shortener { const API_URL = 'http://localhost:8888/r2/api/a.php'; private static function send_post_data($data) { $url = parse_url(self::API_URL); $boundary = md5(microtime(true)); $post = ''; foreach ($data...
by RealTuty
Mon Dec 19, 2011 7:38 am
Forum: Tutorials
Topic: Php Blog
Replies: 15
Views: 1853

Re: Php Blog

it is inserting 0/0/0000 00:00:00 always
by RealTuty
Mon Dec 19, 2011 1:20 am
Forum: Tutorials
Topic: Php Blog
Replies: 15
Views: 1853

Re: Php Blog

Ok. now I am having a problem with the mysql [syntax=sql]NOW()[/syntax] function here is the query code [syntax=php]$sql = "INSERT INTO blog_posts (post_title, post_body, post_user, post_date, post_keywords, post_des) VALUES ('$title', '$body', 'Jason', 'NOW()', '$keywords', '$des')"; $add...
by RealTuty
Sat Dec 17, 2011 6:08 pm
Forum: Tutorials
Topic: Php Blog
Replies: 15
Views: 1853

Re: Php Blog

ok thank you that was the error
:D
by RealTuty
Sat Dec 17, 2011 6:00 pm
Forum: Tutorials
Topic: Php Blog
Replies: 15
Views: 1853

Re: Php Blog

i don't know
by RealTuty
Sat Dec 17, 2011 5:48 pm
Forum: Tutorials
Topic: Php Blog
Replies: 15
Views: 1853

Re: Php Blog

ok so that is working but now i have this code giving me an error the comments.func.inc.php [syntax=php]<?php function get_comments($pid) { $pid = (int)$pid; $sql = "SELECT comment_body AS body, comment_user AS user, DATE_FROMAT(comment_date, '%d/%m/%Y %H:%i:%s') AS date FROM comments WHERE pos...
by RealTuty
Sat Dec 17, 2011 3:55 pm
Forum: Tutorials
Topic: Php Blog
Replies: 15
Views: 1853

Re: Php Blog

thank you that is working now it turns out i did that twice in that same query now i know to look for and now i am able to watch the rest of the video. Thanks again

Jason
by RealTuty
Sat Dec 17, 2011 12:10 am
Forum: Tutorials
Topic: Php Blog
Replies: 15
Views: 1853

Re: Php Blog

this is the error
[syntax=text]#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM posts LEFT JOIN ( SELECT ' at line 9[/syntax]
by RealTuty
Thu Dec 15, 2011 4:32 am
Forum: Tutorials
Topic: Php Blog
Replies: 15
Views: 1853

Php Blog

Hello i have some code i copied from the php blog tutorial that is not working. Any help is accepted. [syntax=php]<?php $connect = mysql_connect('localhost', 'root', 'root'); $databse = mysql_select_db(blog, $connect); echo mysql_error(); function valid_pid($pid) { $pid = (int)$pid; $total = mysql_q...