I need help

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
xunling
New php-forum User
New php-forum User
Posts: 6
Joined: Thu Feb 08, 2018 1:05 am

Fri Feb 16, 2018 2:12 am

Can someone plz tell me how to write

Select item from articles where I’d = ‘1’

in shortest form, in php 7

User avatar
hyper
php-forum Fan User
php-forum Fan User
Posts: 720
Joined: Mon Feb 22, 2016 5:52 pm

Fri Feb 16, 2018 7:49 am

You've already done the sql (except for a using an apostrophe in a column name) :confused:

You can shorten it by using shorter names for the columns; what do you really want?

User avatar
hyper
php-forum Fan User
php-forum Fan User
Posts: 720
Joined: Mon Feb 22, 2016 5:52 pm

Fri Feb 16, 2018 7:52 am

And the version of PHP makes no difference.

:lightbulb:

Now I'm taking a punt here, but are you getting problems with MySQL statements in PHP?

xunling
New php-forum User
New php-forum User
Posts: 6
Joined: Thu Feb 08, 2018 1:05 am

Sat Feb 17, 2018 12:49 pm

Ignore I search for the mysql result function

I only get a result with Num_Rows and “while”

Can I do only $var = mysql_result?

User avatar
hyper
php-forum Fan User
php-forum Fan User
Posts: 720
Joined: Mon Feb 22, 2016 5:52 pm

Sat Feb 17, 2018 4:05 pm

MySQL functions have been removed in PHP 7

Don't confuse MySQL database engine with MySQL functions in PHP; you can still use your MySQL database with PHP using the PDO wrapper.

Post Reply